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

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

Asked by 6 years ago
Edited 6 years ago

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.

01game.Players.PlayerAdded:connect(function(player)
02 
03player.CharacterAdded:connect(function(character)
04 
05if player:WaitForChild("leaderstats").Money12.Value>= 1 then
06 
07print("player.leaderstats.Money12.Value")
08 
09character.Shirt:Destroy()
10 
11end
12 
13lol = script.Parent.Shirt:Clone()
14 
15lol.Parent = character
16 
17end)
18 
19end)
0
print out `player.clothes.Money.Value` The_Pr0fessor 595 — 6y
0
Alright. Pooglies 7 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

0

Answered by

Dalbertjdplayz 8

10 minutes ago

Edited 2 minutes ago

heres a fix

01game.Players.PlayerAdded:connect(function(player)
02player.CharacterAdded:connect(function(character)
03if player:WaitForChild("leaderstats").Money.Value>= 1 then
04player:WaitForChild("leaderstats").Money.Value = player:WaitForChild("leaderstats").Money.Value - 1
05print(player.leaderstats.Money.Value)
06character.Shirt:Destroy()
07lol = script.Parent.Shirt:Clone()
08lol.Parent = character
09end
10end)
11end)
0
Im confused? Pooglies 7 — 6y
0
you know the thing that says lol put line 13 and 15 in under line 5 Dalbertjdplayz 37 — 6y
Ad

Answer this question