Having a client/server issue with spinning lava brick

Hello fellow dev forum members!

My friend and me and creating a obby together, and came across a problem.

We have a spinning lava brick as one of our obstacles:

image

The problem isn’t that It isn’t spinning. I used a hinge and motor. Bam.

Problem is, there is a strange lag like issue.

The character often dies early, before the brick even touches him.

It triggers the touched event to early.

I feel like this is some client/server issue, but I don’t know what to do.

Just wondering if any of you would have any ideas. Thanks!

2 Likes

Having body movers on the server for things that have collision can and will cause many network transfers, which will cause jitter and often be inconsistent. One solution could be to have the body movers and the touch function on the client side by using a script.

EDIT: You can disable network transferring automatically with a script, this will probably be the more viable solution.
Call :SetNetworkOwner() on the part.

3 Likes

Thank you! Yes, I was thinking the answer would be something like this!

How do I set it to everyone’s client individually, instead of just setting it to one person. You can’t set network ownership from the the client can you?

You could just quickly put a script in the part that does script.Parent:SetNetworkOwner()
if you only need it on the server for one part.

Wait. So your saying I need to set the network owner to the server?

Yes, by doing this you are ensuring that no touches by players will transfer future ownership.

2 Likes