I have this script that if you have a value in the pants, it will give you pants, but its not working, any help on this? heres the script.
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
if player:WaitForChild("leaderstats").Pants.Value == 1 and character:WaitForChild("Pants") then -- "DefaultPants"
wait(1)
local d = character:FindFirstChild("Pants")
d.PantsTemplate = script.Pants.DefaultPants.PantsTemplate
end
end)
end)
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
if player:WaitForChild("leaderstats").Pants.Value == 2 and character:WaitForChild("Pants") then -- "Dark Grey Jeans With White Shoes"
wait(1)
local d = character:FindFirstChild("Pants")
d.PantsTemplate = script.Pants.DarkGreyPants.PantsTemplate
end
end)
end)

2 comments
Can only only show code relevant to the problem?
This is the only code I have...