I want to make space game, and i want to make script which will kill players if they don't wear space hat when they leave room.
Or script which instantly wear hat on spawned player.
Kill instantly:
while true do wait() for i,v in ipairs(game.Players:GetChildren()) do if v.Character then if v.Character:FindFirstChild("HATNAME") == nil then v.Character:BreakJoints() end end end
Kill slowly:
while true do wait() for i,v in ipairs(game.Players:GetChildren()) do if v.Character then if v.Character:FindFirstChild("HATNAME") == nil then v.Character.Humanoid.Health = v.Character.Humanoid.Health - 1 end end end
If this doesn't work then i'm sorry. I didn't test it