Ways to move your parts with 0 lag. (List of good and bad methods)

How does this work in a different way? The only difference is you don’t have to parent your LocalScripts inside of StarterCharacterScripts or some other place that LocalScripts have been programmed to work inside. (I think.) Before this was implemented, there were pretty strict restrictions when it came to LocalScripts being parented to certain things. Other than that, I see no difference. The RunContext is not meant for moving parts by itself. RunService is an automated function that can move parts by frames. RunContext on the other hand, is used for changing how scripts function. Changing it to Client will only make the code inside it run for the Client. Changing it to Server… well I have no idea what that does actually. I assume it’s just the somewhat outdated version of Legacy or whatever purpose it serves. Regardless, the RunContext will not change crap when it comes to part CFrame, Positions, etc. You cannot compare RunService with RunContext. They are totally different things with different purposes.

2 Likes

Ah, guys. Finally updated this post! Sorry, I’ve been incredibly busy and admittedly lazy :melting_face:. It’s okay though, cause now I have updated this one.

2 Likes

Is there a reason why you’re using task.wait() in a Heartbeat connection? Also you can get deltatime in a while loop by doing local delta = task.wait() or local deltatime = game:GetService(“RunService”).Heartbeat:Wait()

1 Like

What about the prismatic constraint? Also for good enough FPS you should turn the collisions off on the part that will be moved.

tweening works as well btw

1 Like

The PrismaticConstraint is located underneath the “Constraints” section! You can find it under “Methods with collisions on and welds.” on line 43 and 44.

1 Like

There’s many ways to move parts around.
Note that these are just some basic examples of moving parts.

  1. PrismaticConstraints; this method of movement involves two attachments. One on the part that will be moved. And one on another part which cannot move. (Such as a solid wall)

  2. CFrame; Using CFrame is a little more complicated than other methods. This involves Vector3 (You can also use CFrame for rotation)

  3. TweenService; you can use this to make different kinds of movements. You just have to set the EasingStyle and EasingDirection, and seconds which the Tween will run for.

  4. LinearVelocity; this one is rather simple, you just have to change the XYZ values on the properties and it moves.

I hope this helps.

2 Likes