I am trying to make a script that adds 5 to a players money everytime it hits a part called Money collector. The script is a local script and it is in StarterCharacterScripts.
1 | local money = game.Players.LocalPlayer.leaderstats.money |
2 | local part = game.workspace.MoneyCollector |
3 | part.Touched:Connect( function (hit) |
4 | if hit.name = = "MoneyPart" then |
5 | money.Value = money.Value+ 5 |
6 | end |
7 | end ) |
no error pops up it just doesnt work
1 | local money = game.Players.LocalPlayer.leaderstats.money.Value -- Forgot the .Value <3 |
2 | local part = game.workspace.MoneyCollector |
3 | part.Touched:Connect( function (hit) |
4 | if hit.name = = "MoneyPart" then |
5 | money.Value = money.Value+ 5 |
6 | end |
7 | end ) |
~ SinfullyLucky#7153 ????????????