teams[3].PlayerAdded:Connect(function(player)
local plr = workspace:WaitForChild(player.Name)
player.CharacterAdded:Connect(function(character)
character:WaitForChild("Humanoid").Died:Connect(function()
if player.Team == teams[3] then
if player:GetRankInGroup(8349025) >= 3 then
plr.Shirt.ShirtTemplate = "https://www.roblox.com/catalog/SHIRT/"
plr.Pants.PantsTemplate = "https://www.roblox.com/catalog/PANTS/PANTS"
end
end)
end)
if player:GetRankInGroup(8349025) >= 3 then
plr.Shirt.ShirtTemplate = "https://www.roblox.com/catalog/SHIRT/"
plr.Pants.PantsTemplate = "https://www.roblox.com/catalog/PANTS/PANTS"
end
end)
Oh, in that case the script you currently have will only run when a player is added to a new team…When you die nothing happens because I think you need player.CharacterAdded Workspace.ChildAdded to Workspace to be outside of your PlayerAdded function
Also, the clothes change but they don’t show the shirt (meaning when it changes, it doesn’t put anything)… it jut removes the player’s current shirt and replaces it with nothing… know a fix?
It works fine when they join the team, but not when they reset… why is this?
game.Players.PlayerAdded:Connect(function(player)
local plr = workspace:WaitForChild(player.Name)
player.CharacterAdded:Connect(function(character)
character:WaitForChild("Humanoid").Died:Connect(function()
if player.Team == teams[3] then
if player:GetRankInGroup(ID) >= NUMBER then
plr.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=Shirt"
plr.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=Pants"
end
end)
end)