I'm running it through a server-side script, and I've tried every possible method I could think of. Regardless, here's the script.
wait(10) for i,v in pairs(game.Teams["CLE Cavaliers"]:GetPlayers())do if v:FindFirstChild("Pants") then v.Pants:Destroy() end local b = Instance.new("Pants") b.PantsTemplate = "http://www.roblox.com/asset/?id=854306032" b.Parent = v end for i,v in pairs(game.Teams["GS Warriors"]:GetPlayers())do if v:FindFirstChild("Pants") then v.Pants:Destroy() end local b = Instance.new("Pants") b.PantsTemplate = "http://www.roblox.com/asset/?id=854306307" b.Parent = v end for i,v in pairs(game.Teams["CLE Cavaliers"]:GetPlayers())do if v:FindFirstChild("Shirt") then v.Shirt:Destroy() end local b = Instance.new("Shirt") b.ShirtTemplate = "http://www.roblox.com/asset/?id=854305833" b.Parent = v end for i,v in pairs(game.Teams["GS Warriors"]:GetPlayers())do if v:FindFirstChild("Shirt") then v.Shirt:Destroy() end local b = Instance.new("Shirt") b.ShirtTemplate = "http://www.roblox.com/asset/?id=854306146" b.Parent = v end
If you want to you can condense it. But nothing seems to be working. The script just passes through it. I don't want to kill them, cause I do have other scripts that whenever a player joins, depending on a certain value during the game, their shirt and pants will be destroyed and be replaced with a uniform. Please help! Thanks.
-LukeGabrieI aka EnergyBrickz