#so im trying to make it look cleaner like a reset Data

24 messages · Page 1 of 1 (latest)

leaden dawn
#

im trying to make the ResetData part look better instead of this

#

@grim dawn

#

i originally had it like this but this did not make the Values set to 0

late scaffold
#

SetAsync 🥱

languid surgeBOT
#

studio** You are now Level 17! **studio

leaden dawn
leaden dawn
warped sparrow
#

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

leaden dawn
#

well i fixed the Reset Data part

warped sparrow
#

Get players stored in player and checking if players is a folder??

leaden dawn
#

the really should update it to lua if players:HasA('Folder') then makes it better

warped sparrow
#

Huh???

#

You mean Instance:FindFirstChildOfClass("Folder")

#

HasA makes no sense

#

Instance:IsA() checks if the object is (or inherits) that class

warped sparrow
# leaden dawn dont need to since it works

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)

warped sparrow
#

Bad habits gahhhhh