Why does this stop working after I respawn even though its a CharacterAdded function?
01 | game.Players.PlayerAdded:Connect( function (plr) |
02 | plr.CharacterAdded:Connect( function (chr) |
03 | repeat wait(. 1 ) until chr:IsDescendantOf(game.Workspace) |
06 | if chr:FindFirstChild( "Shirt" ) = = nil then |
07 | local shirt = Instance.new( "Shirt" ,chr) |
09 | elseif chr:FindFirstChild( "Shirt" ) then |
11 | local shirt = Instance.new( "Shirt" ,chr) |
16 | if chr:FindFirstChild( "Pants" ) = = nil then |
17 | local Pants = Instance.new( "Pants" ,chr) |
19 | elseif chr:FindFirstChild( "Pants" ) then |
24 | for i,v in pairs (chr:GetChildren()) do |
25 | if v.ClassName = = "Accessory" then |
30 | if v.Name = = "Body Colors" then |
31 | v.HeadColor = BrickColor.new( "Baby blue" ) |
It works when I press play but then if I reset, it only sets the pants and shirt, and doesn't get rid of the accessories nor makes my head blue. Why?