...it doesn't work. Normally what I would do is debug it, but today I got an unusual error that I have NEVER seen before. It involves WaitForChild, but that's all I know.
--Essentailly what this script does is clone a shirt and a pants from the ServerStorage, and puts it into the Player's character. At least it should.
cache = game.ServerStorage
cloth = cache.Clothes
game.Players.PlayerAdded:connect(function(ply)
ply.CharacterAdded:connect(function()
if ply.TeamColor.Name == "Mid gray" then
shirt = ply.Character:WaitForChild("Shirt")
pants = ply.Character:WaitForChild("Pants")
shirt:Destroy()
pants:Destroy()
cloth.Inmates.prisontop:Clone().Parent = ply.Character
cloth.Inmates.prisonbot:Clone().Parent = ply.Character
end
end)
end)
Here is the output.
18:05:41.752 - WaitForChild called on an Instance that is not in a DataModel.
18:05:41.753 - Script 'ServerScriptService.Script', Line 17
18:05:41.753 - Stack End
18:05:41.755 - Disconnected event because of exception
