When using :GetPropertyChangedSignal how do I get the oldValue?
1 Like
Everytime it’s called, make a variable to set it to the old value so if it changes again, you have the old value! Something like:
local testing = game.Players.LocalPlayer.Coins -- anything
local lastValue = 0
testing:GetPropertyChangedSignal("Value"):Connect(function()
lastValue = testing.Value
-- whatever code
end)
1 Like
no but like lets say i save data from a leaderboard to a datastore and t he player has 50 from their last login then how do i detect that
Use :GetAsync with the datastore to get it, :SetAsync to save it to its last value.
werent u able to get the oldvalue from .Changed?
is there a way to get for the :GetPropertyChangedSignal to also give me a oldvalue?
Short answer there is not. You have to use a work around. There are many though, so it’s not a big issue
Can you show me a few work arounds