Motor6Ds - Time Taken to Reach Desired Angle

Well I used Motor6Ds because they provide very smooth transitioning of movement, is that provided within your attachment or? If so, I’m more than willing to give that a try!

What do you mean “smooth transitioning of movement”? I attached a GIF, do you mean acceleration/deceleration at the highest points?

I mean to say how smooth it appears on the server as well as all clients involved. Reason I did not consider also something like RunService was that smoothly tweening things is possible via it, however, I wanted it available on the Server so that it doesnt appear that for a specific client it’s smooth and for other players viewing the rest doing an obstacle, it doesn’t look like they are just jumping through that hammer (which can happen as the client will display the position depending on the network of the client and other factors such as when the player joined in comparison to the rest). I’ll look at your place real quick, thanking you for providing that!

You can change the workspace.DistributedGameTime to workspace:GetServerTimeNow, and even if the Script is Client-side, it’ll be synchronized with every other player

Do you mean via a script usage or? So what I’d need to do is that I have a script that would dedicate to updating that value in a while loop per task.wait() for example?

No, you can just replace the value directly:

RunService.PreSimulation:Connect(function()
	Pendulum:PivotTo(
		CFrame.new(Pendulum:GetPivot().Position)
			* CFrame.Angles(0, 0, math.sin(workspace:GetServerTimeNow() * 1.5) * .75)
	)
end)

I see, alright well yeah it appears on your replacement that the pendulum now smoothly moves across the server, however clients are still slightly behind and lag slightly when viewing through that.

Change the RunContext of the Script to Client, then it’ll run independently for every Player like a LocalScript (except RunContext=Client Scripts can run anywhere, like RunContext=Server), but it’ll still be synchronized across them because of :GetServerTimeNow being synchronized.

I see, it is almost perfectly synchronised that way, however, might I be correct in assuming that because there is still some lag that that is purely the fault of Roblox’s engine being slow? Also, reason I wanted this server side was for that exact reason really.

What do you mean by “lag”? Is it stuttering? Is it slow?

When the player collides with the pendulum, the force at which is applied to the player is slightly behind time - the player appears to be going through the pendulum slightly it seems when viewing from another client in studio (see below):
image

The player would then proceed to moving a bit after but there I caught it it looks like before any force even appeared on the other client’s side.

That’s because of the delay between their Client registering they’ve hit the pendulum, sent the message to the Server, and for the Server to notify your Client. In fact, in the Server view it’s likely the same story because the pendulum has no collision physics and doesn’t get stopped by the Character, nor can it move the Character because Players control their Character’s physics, and the Server just listens to them.

There isn’t a lot you can do practically to prevent this, other than, potentially, having duplicates of every Player on the Client so that they get moved by the pendulum hitting them, but it’s probably just going to cause more issues down the line for something that doesn’t really matter.