How do i make a script that removes the player's hat when they touch a certain brick?
Sounds a bit like a request but a good place to start would be using events such as
brick = script.Parent -- or wherever brick.Touched:connect(function(part) -- Touched function returns the part that touched the brick. head = part.Parent.Head -- variable stores the part's parent (the character) then their hat. parts = head:GetChildren() -- Makes a table of all the parts in the head for i,v in pairs(head) do -- iterates through the children of the head if v:IsA("Hat") then -- if a hat is found the hat is removed. v:Destroy() end end end)