Destoy is not a valid member of UnionOperation

Full error:
Destoy is not a valid member of UnionOperation "Workspace.Maximplay47.Head.WhiteHat"

Script:

noneevent.OnServerEvent:Connect(function(player)
	local Character = player.Character or player.CharacterAdded:Wait()
	local Head = Character:WaitForChild('Head')
	for i, v in pairs(Head:GetChildren()) do
		print(v)
		if v and v.Name == "WhiteHat" then
			v:Destoy()
		end
	end
end)

You misspelled Destroy. You missed the r

i can’t believe it’s actually works. big thanks :yum:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.