DataStore2 :OnUpdate() not recognizing data is updated from another script

I’m trying to use :OnUpdate() to reflect the value the data is set to to a leaderstat value but when I do ExampleDataStore:Increment(100) from another script, the script that has ExampleDataStore:OnUpdate(ReflectToLeaderstatFunction()) in it does not return anything. I know the function works because when using ExampleDataStore:Set(1) in that same script, the function is called and the data is updated. Does :OnUpdate() not recognize when the data is updated from another script or am I doing something wrong? Thanks.

Just going to assume DataStore2 is incapable of this. I used a bindable event to increment the datastore and set the leaderstat value in the same function, removing the need for the :OnUpdate() function entirely. When players join I simply trigger the same function without the increment part.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.