How do I disable a component on a non-player object for everyone?

Hello!

I am making a survival game in which the player can “destroy” / mine a tree but all im really do is disable the collider and mesh renderer howether how would I disable the component for everyone on the server? because right now it only happens localy.

Thank you!

Tell the clients to disable it? Since you don’t know this. Im assuming you’re using HLAPI. If that’s the case. Check out Command and RPCs

1 Like

What TwoTen said. Have the server call a ClientRpc, and in that rpc you disable those components. The ClientRpc will be called on every client.