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

How to give specific player money?

Asked by 5 years ago
Edited 5 years ago

its not giving me 100 coins i get this error: ServerScriptService.rich:7: Expected identifier when parsing expression, got <eof>

1--Locals--
2 
3local NomanCoins = game.Players:WaitForChild("Noman538").leaderstats.Coins.Value
4 
5--Main--
6 
7NomanCoins = 100+

I know im bad at scripting

0
All you have to do is NomanCoins = NomanCoins + 100 JesseSong 3916 — 5y
0
wth is a noman greatneil80 2647 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

Put the value you want to add in first, then add the value you want to it.

1--Locals--
2 
3local NomanCoins = game.Players:WaitForChild("Noman538").leaderstats.Coins.Value
4 
5--Main--
6 
7NomanCoins = NomanCoins + 100
0
I'm so bad but this is how it starts right? ty for help Noman538 -2 — 5y
0
This script basically, wait for a child to join in if their name = Noman538 then it checks for leaderstats and then add 100 coins as stated on line 7. JesseSong 3916 — 5y
Ad

Answer this question