So, I’ve asked this on building support, since it relates to building things, not scripting, but no one responded, so here I am. I’m using Hinge Constraints to create carts for the ferris wheel so the cart can rotate, but it lags behind if you’re too far from it. Is there any way I can update it correctly?
I’m not very good with the new constraints, but you could try either setting the network ownership of the parts to nil, or try adding the constraints on the client (but you would then need to sync up each client).
How do I add the constraints on the client side?
Edit: I only need to know how to keep it updated correctly, as I rotate it with a server script, which should be sufficient.
You’d just use a local script to update the constraint rather than a server script, but this probably isn’t the best idea because syncing up each client’s constraints might be difficult.
First I’d try the network ownership idea. Lagging once unanchored parts get far away is usually caused by the ownership switching from a client back to the server or another client. You can loop through the unanchored parts of the entire thing and use part:SetNetworkOwner(nil)
Is there other ways of doing it?
Not that I can think of at the moment.
Can you explain the updating part a little bit more?
I don’t completely understand what you mean by it lagging behind, but most of the time unanchored parts lag is because of network ownership. From what I understand about ownership, a part lags once it switches from a client to the server or another client, so if you set the network ownership to nil (so it stays on the server all the time), it should stop lagging once you get farther away from it.
Was it set for all of the unanchored parts that are moving? If so, I’m not really sure what else you could do to prevent it. Could we see the script that updates it?
Yeah, I don’t really see anything that would cause it to only move when a player is nearby, sorry. However, for future references you can replace v:IsA("MeshPart") or v:IsA("Part")
with v:IsA("BasePart")
to include all types of parts.
Maybe because I’m connecting it by a Hinge constraint?
Potentially, but I’m not very knowledgeable about the new constraints. Do you have any clips of the behavior you’re talking about?
I honestly gave up on it, but here it is. The cart just stays in the same place until I move close to it.
Hey I’m having the same issue, did you ever fix it? (lol 1 year later)
Lol, no, I have not. I’ve more or less given up on it since I wasn’t getting paid to do it and plus, someone else did it at the end, I believe. I’m not very good with Roblox’s internal physics and all that.