Parts are not smoothly falling from gravity

In the above video, gravity is set to 9.8m/s^2. For each triangle, the following occurs:

  1. Clone a part from Replicated Storage
  2. Set Position to height out of screen, Anchored = true
  3. Parent the part to workspace
  4. Set Anchored = false

If you watch the first half of the video, you can see that some parts do not fall as one would expect. There are moments where parts seem to freeze for some time or jump to a new position suddenly.

Oddly enough, if I let this play out long enough, eventually the parts do fall as expected (see second half of video)

Can anyone:
A) Explain why this behavior is occurring, or possible causes
B) Suggest a solution that ensures this does not happen

Thanks

1 Like

It probably has something to do with this:

When a Roblox game runs, several computers/devices are involved. To divide the work of calculating physics, Roblox automatically assigns parts to either the server or to a client. In general, if a part is near an in-game character, its physics will be calculated by that player’s device; otherwise it will be calculated by the server. In either case, the server or client that calculates a part’s physics is called its owner.

Since physics updates must be sent over the network, there’s a small delay between when the owner makes the physical changes and when the other devices see those changes. Normally this delay isn’t too noticeable, but issues may occur when part ownership changes.

2 Likes

Have you tried switching step 3 with step 4? Besides Network Ownership (which may very well be the problem), it might have something to do with how it’s being unanchored before being reparented.

Never knew about this… TIL. Thanks!

Why would the part need to be reparented after changing its anchored value?

The purpose of doing this is so the shapes are added to the game (parented to workspace) aligned at the same Y position. Then I can remove the anchor for all 3 such that all 3 triangles in a row appear to fall at the same time… is there some other advantage of switching step 3 and 4 that I’m missing?

No problemo, I am happy to help

1 Like