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

5 comments

1

Is FE on?

1

OHH, shirt and pants are in the CHARACTER not the player.

1

I would recommend you check to see if each player has a character. if so change the value of the shirt and pants to a new ID. I know for sure that works, I change outfits by just changing ID.

1

you know you dont have to destroy and replace them, you could just set the Template and done!

0

yea lol, it's complicated