Unanchored parts not reacting until nearby to them?

My parts are being unanchored on the client but they do not behave like an unanchored part until I move nearby them. I have heard about SetNetworkOwner but I am not sure how that should be implemented if it is the solution.

1 Like

The parts have fallen asleep, meaning they won’t be simulated until a force acts upon them, or a player gets near them. This saves memory for calculating other physics bodies.

You might be able to find a workaround by setting velocity to (0,0.005,0) every few seconds if its velocity is (0,0,0) to make sure it won’t fall asleep.

edit: velocity should be applied when you unanchor, was thinking about a different issue above.

1 Like

You cannot achieve a networked physics change on a part that is anchored on on the server. Unanchoring a part on a client will have no effect on the server or other clients, and may have unexpected effects on the client like you are observing. Calling SetNetworkOwner on an anchored part will throw an error. If you want the unanchoring effect to replicate to all clients, it must be unanchored on the server.

However, I have a feeling this isn’t what you’re trying to do. Based on the context, it looks like you’re trying to offer parallel experiences to each client of locally unlocking the gate, where one client can experience the effect without affecting other clients. I would do this by removing the parts on the client, then making a copy and parenting the clones back to workspace. Since the duplicate parts do not exist on the server, they should be locally simulated by your client, and since the changes you made were only on that client, other clients will see no change.

10 Likes

If you are trying to unanchor on the client then you have to set networkownwer ship , you can do this by the following code

Part:SetNetworkOwner(Player)

Thanks :grinning: