if playerQuery[i].Character and playerQuery[i].Character:FindFirstChild("Torso") and playerQuery[i].Character:FindFirstChild("Humanoid") then
function uniform()
playerQuery[i].Character.Shirt:Destroy()
playerQuery[i].Character.Pants:Destroy()
local shirt = Instance.new("Shirt", playerQuery[i].Character)
local pants = Instance.new("Pants", playerQuery[i].Character)
shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=281088169"
pants.PantsTemplate = "http://www.roblox.com/asset/?id=281088561"
end
if (playerQuery[i].Character:findFirstChild("Humanoid")) then
playerQuery[i].Character.Humanoid.Died:connect(function()
uniform()
end)
end
end
end
end
playerQuery is already defined as the player, by the way. Also, there is more to this script but it is a lot of coding so I only posted the lines necessary.
The purpose of this script is to give a uniform to a player on command, which works but I'd like to give the uniform to the player permanently.. meaning I'd like the player to have the uniform even after the player dies/respawns.

2 comments
It helped greatly! However, sometimes it doesn't give the specified player the uniform after dying unless you do the command several other times. Any way to counter/fix this?
You can try making a variable of the player name to make sure that the added instance is that player that has the effects of the command. Your table may be changing for the [i] which causes it to wait for another person. Can't tell much w/o full script.