How to make the points permanent?
I have a point giving script and what would be the correct script to add to this so that when a player leaves and rejoins, the points that are given from this part are still there. Currently, when you leave, you will lose all of the points that you got from this part. How would I make the points not go away?
03 | function onTouched(hit) |
07 | check = hit.Parent:FindFirstChild( "Humanoid" ) |
11 | local user = game.Players:GetPlayerFromCharacter(hit.Parent) |
12 | local stats = user:findFirstChild( "leaderstats" ) |
15 | local cash = stats:findFirstChild( "Points" ) |
16 | cash.Value = cash.Value + 5 |
27 | script.Parent.Touched:connect(onTouched) |