So i've made this script that's suppose to remember how many stages the player has completed and how many trophies he's collected but it won't work even tho it doesn't show any errors.If any1 has any ideas or suggestions i'm all ears.
Thanks for your time
01 | data = game:GetService( 'DataStoreService' ):GetDataStore( 'MobbyProgres' ) |
02 |
03 | game.Players.PlayerAdded:connect( function (p) -- Player joins |
04 |
05 | local stats = Instance.new ( "IntValue" ,p) |
06 | stats.Name = "leaderstats" |
07 |
08 | local stage = Instance.new( "IntValue" , stats) |
09 | stage.Name = "Stage" |
10 | stage.Value = 1 |
11 |
12 | local trophies = Instance.new( "IntValue" ,stats) |
13 | trophies.Name = "TrophiesFound" |
14 | trophies.Value = 0 |
15 |
You name your values "Stage" and "TrophiesFound", but you attempt to save "stage" and "throphies".
Fun fact: You did get errors, but you didn't see them cause it errors the moment you leave.