Basically - I have a key, the client fetches the instance of it, the server moves it into server script service. The client still can see the instance (because it was defined before the server moved it), and prints out the instance but still sees the value beforehand, despite it being changed on the server - any reason why? I’m quite new at making these detections.
Solved
Figured out the problem, simply don’t move it to server.
Hi!
Glad to see you’ve already found a solution to your problem, just wanted to provide some insight as to why this happens.
When you assign a value to a variable in a script, it’s saved to memory. Usually, when a change is made to an instance, that change is communicated to any scripts that have a valid handle to it.
However, if the script doesn’t have a valid handle or doesn’t have access to it, then this change isn’t communicated.
So, when the server makes the change to the instance in ServerStorage, the LocalScript isn’t notified of this change because the instance is in a location it can’t access. Because of that, it maintains the “old data”.
I played around with this for a while, and that’s the general conclusion I’ve come to. If I got something wrong, someone please let me know.
This is awesome!! Thank you so much. Is it fine if I dm you with my solution and we can talk more in-depth? Thanks!
Of course!
Feel free to shoot me a message on the Roblox site, but you can also add me on Discord if preferable at Zero#1952.