Help with saving a object value through games

Hello, I’m trying to make it where the players object value which is in the player saves when leaving or joining another game, I’m not a good scripter so I don’t know how to change it from a number value to a object value and make it work, any help?

An object value stores a reference to an Instance. It’s not possible to serialize this. What you can serialize is a value that represents something defining about the instance (like hierarchy position or its name).

For example, you can serialize a “FrontRightWheel” Instance to “Workspace.Car.FrontRightWheel”, then find the wheel again and set the ObjectValue.Value to the wheel.

You can also just store the name (assuming it’s unique), find the instance again, and then set the ObjectValue to that.


Edit:
I think someone made a resource that gives game instances unique IDs or something, that would also work. Pretty complex and a little inefficient though.