Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

My shirt spawner script isn't working on spawn, any help?

My script that with a value, you get a shirt, isn't working, I have no idea if its because i have 2 leaderstats, instead of just 1, but any help? Heres the script.

game.Players.PlayerAdded:connect(function(player)

player.CharacterAdded:connect(function(character)

if player:WaitForChild("leaderstats").Money12.Value>= 1 then

print("player.leaderstats.Money12.Value")

character.Shirt:Destroy()

end

lol = script.Parent.Shirt:Clone()

lol.Parent = character

end)

end)

2 comments

0

print out player.clothes.Money.Value

0

Alright.

1 answer

0

Answered by

Dalbertjdplayz 8

10 minutes ago

Edited 2 minutes ago

heres a fix

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
if player:WaitForChild("leaderstats").Money.Value>= 1 then
player:WaitForChild("leaderstats").Money.Value = player:WaitForChild("leaderstats").Money.Value - 1
print(player.leaderstats.Money.Value)
character.Shirt:Destroy()
lol = script.Parent.Shirt:Clone()
lol.Parent = character
end
end)
end)

2 comments

0

Im confused?

0

you know the thing that says lol put line 13 and 15 in under line 5

This discussion is preserved as it was. New answers, comments, and votes are closed.