here's my script:
\lua game.ReplicatedStorage.hat.OnServerEvent:Connect(function(plr)
if plr.leaderstats.Hat.Value < 5 then
plr.leaderstats.Hat.Value = plr.leaderstats.Hat.Value + 1
local char = plr.Character or plr.CharacterAdded:wait()
local hum = char.Humanoid
local Replicated = game:GetService("ReplicatedStorage")
local hatone = Replicated:WaitForChild("tophat"):Clone()
local hattwo = Replicated:WaitForChild("tophat"):Clone()
local hatthree = Replicated:WaitForChild("tophat"):Clone()
local hatfour = Replicated:WaitForChild("tophat"):Clone()
local hatfive = Replicated:WaitForChild("tophat"):Clone()
if plr.leaderstats.Hat.Value == 1 then
hatone.Parent = char
end
if plr.leaderstats.Hat.Value == 2 then
hattwo.Parent = char
char.hatone:Destroy
end
if plr.leaderstats.Hat.Value == 3 then
hatthree.Parent = char
char.hattwo:Destroy
end
if plr.leaderstats.Hat.Value == 4 then
hatfour.Parent = char
char.hatthree:Destroy
end
if plr.leaderstats.Hat.Value == 5 then
hatfive.Parent = char
char.hatfour:Destroy
end
end
end)\
all of the destroy lines are highlighted with this error and I am very, very confused.
** You are now Level 12! **