#check if variable changed not triggered

12 messages · Page 1 of 1 (latest)

woven orchid
#

    dollars.Changed:Connect(function()
        print("Dollars changed")
        sessionData[player.UserId].Dollars = dollars.Value
        print(sessionData)
    end)
    

everytime i run the game and change the dollars variable in the explorer the dollars.Changed thing doesnt get triggered. is there a reason why this happens?

atomic portal
#

when you press "play" you have the option to either be on the server side, or on the client side (you play as your character)

#

i assume what happened is that the script is not a local script, and when you changed the value on the client side, the server didnt see that (it cant)

woven orchid
# atomic portal i assume what happened is that the script is not a local script, and when you ch...

oh true, but why did it work in this video if it shouldnt work?
https://youtu.be/H-cDbjd5-bs?si=XIew10wldb_0TLvq&t=943

DATASTORE EDITOR ► https://devforum.roblox.com/t/datastore-editor-v3/716915

MERCH ► https://shop.gnome.codes/
DISCORD ► https://discord.gg/utqq7zM
TWITCH ► https://www.twitch.tv/gnomecode
TWITTER ► https://twitter.com/gnomecodeRBLX
WEBSITE ► https://gnome.codes/

TIMESTAMPS ►
00:00 Intro
00:15 What is Datastore
01:27 Saving data
07:45 Loading d...

▶ Play video
#

its also a serverscript but it somehow detects the changing variable

atomic portal
#

he said

#

"we go into the server"

#

and he switched to the server side

woven orchid
#

ooooh...

#

i missed it