Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why wont this script change the clothes properties?

Asked by 6 years ago

Why wont this script set the Pants and Shirt to the desired pants and shirt? I am getting no errors in console or using the debug tool. This is in a normal script in the players PlayerScripts.

game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        local Playername = script.Parent.Parent.Name
        local Player = script.Parent.Parent
        if Player.TeamColor == BrickColor.new("Really black") or player.TeamColor == BrickColor.new("Cyan") or player.TeamColor == BrickColor.new("Bright yellow") or player.TeamColor == BrickColor.new("Deep blue") or player.TeamColor == BrickColor.new("Crimson") then
            game.Workspace[Playername].Pants.PantsTemplate = 1415025522
            game.Workspace[Playername].Shirt.ShirtTemplate = 1438091599
        end 
    end)
end)
0
Maybe change the shirt in the script that sets the team color? OldPalHappy 1477 — 6y
0
But wouldnt that mean when the player dies it would remove the outfit? RexRicher 0 — 6y
0
The PantsTemplate and ShirtTemplate should be a string BlizzardBan 15 — 6y

Answer this question