#so im trying to make it look cleaner like a reset Data
24 messages · Page 1 of 1 (latest)
@grim dawn
i originally had it like this but this did not make the Values set to 0
SetAsync 🥱
** You are now Level 17! **
ive already tried that didnt work
well i fixed it
I mean I feel like your locking yourself into just using integer values if you just value to 0
Wait are you storing a single value per datastore key? Instead of just storing a table of the values?
It kind of looks like your doing something like:
PlayerData -> 123456789Coins -> 100
PlayerData -> 123456789Kills -> 56
Instead of:
PlayerData -> 123456789 -> { Coins = 100, Kills = 56 }
just example data
well i fixed the Reset Data part
Next you gotta fix that GetData method 😭 what are those variable names
Get players stored in player and checking if players is a folder??
dont need to since it works
the really should update it to lua if players:HasA('Folder') then makes it better
Huh???
You mean Instance:FindFirstChildOfClass("Folder")
HasA makes no sense
Instance:IsA() checks if the object is (or inherits) that class
Readability tho... If you go back to this code in the future and have forgotten how it works you code should explain itself through function and variable names (and comments if the idea is more complex)
no
dont need to
Bad habits gahhhhh