Sync issues

Hello. I’m trying to make a vending machine, and I’ve been working on it for a while, I have managed to sync events, the object spawns on both ends.

However, there is a problem that I don’t quite know how to confront. The problem is, the prop doesn’t sync after it’s placed, when someone picks it up, it won’t reflect on the other users.

Additionally; When a non-owner player spawns in the prop, they can’t pick it up after it was created.

This is the script:

And I also attached an example of what is happening:

I am unsure why this is happening, and I would really appreciate if someone can help me out. I am simply unsure what I have done wrong, i tried searching everywhere, and from what I can tell, I’m doing it right.

This is also a screenshot showing one of the buttons that you click to spawn a prop, it’s simply a bunch of buttons domplicated but with values changed. As far as I know, this shouldn’t cause problems.

And here is one of the “Soda” props, which is what you get from the vending machine, I think the problem may be in this field, however I don’t know what it is.

If someone can help me out, i would be very grateful. I’ve been stuck on this for a while and all day yesterday I’ve been basically tinkering with it, trying to resolve it.
I hope with someone’s help, i can have this fixed,

thank you in advance.

Sorry to hear that you’ve been having trouble!

Instantiated objects cannot be synched. So instead of using the ‘Instantiate’ node, you’ll need to switch to an object pool!

VRChat has a built-in component to manage object pools, or you could make your own.

Hi there, Thank you for your reply!

Would you maybe be able to give me an example of some sort? I’m not quite sure how I would go about implementing this feature.

I’m just not quite sure how I would go about adding this into my graph and whatnot, I tried doing some research on this feature, but I couldn’t find anything that matches what i’m looking for, if you could provide an example of some sort or where I can go about finding more information about this, it would be greatly appreciated.

thank you.

Here’s a very basic example from 2021. Object Pool and Array Shuffling | VRChat Open-Beta 2021.2.3 - YouTube

Basically, you’d have several disabled objects in your scene, ready to be enabled. These would be managed by the VRCObjectPool component.

When a player wants to spawn an object, instead of instantiating a new one, you’d call TryToSpawn on the Object Pool. This would spawn your object, which would work with network sync!