i want to know how to so i can expand on that and try different things
When they spawn check that they are wearing the offending hat (with character:WaitForChild(hatName, 3)
, including the 3s timeout) and if the result is not nil call kick on their player.
PS: Don't kick me because of my head :(
In a server script placed in StarterCharacterScripts write the folllowing.
local hat = "hat name" if script.Parent:FindFirstChild(hat) then local plr = game.Players:GetPlayerFromCharacter(script.Parent) plr:Kick("You were kicked for wearing ".. hat) end
If the player is not wearing the hat it will say it cant find it.