Why are these platforms stuttering? Moved by constraints

Greetings,

As you can see in the video, I have 4 moving platforms, all are exactly the same, they are moved by a prismatic constraint and there are 2 invisible touch parts at the end of their route that change their velocity so that they move back and forth

but for some reason i can’t figure out they seem to lag or stutter on the client even tho they move smoothly on the server,
there are also some other parts spread around the workspace that move using constraints as well, but I have spaced them very far apart and and using Streaming enabled with a streaming distance of 512 studs so that the client only has to load 1 set of moving parts at a time but still 2 of the 4 platforms just won’t cooperate

thank you for your time

EDIT: further testing has shown that the reason for the sttutering is the orientation of hte platform???

for some reason i can’t explain how i orient the platform affects the performance?

Have you tried setting the parts ownership to nil like this?

script.Parent:SetNetworkOwner(nil) -- Put this  script under the platform

there is no script tho, the platform moves via a Prismatic constraint, and there is just 2 parts that change its velocity on contact

EDIT: but i did it anyway

for i,v in pairs(workspace.PlatformPairs:GetChildren()) do
	for f,g in pairs(v:GetChildren()) do
		if g.Name == "D" or g.Name == "F" then
			g.Touched:Connect(function(part)
				if part.Name == "b" then
					part:SetNetworkOwner(nil)
					v.a.PrismaticConstraint.Velocity *= (-1)
				end
			end)
		end
	end
end

no effect

Changing between the NetworkOwner can make the platform stutter.

true but that doesn’t explain why it only stutters when going North to South and not any other direction

Have you built this lagging constraint platform or just copy and pasted from the other working platforms?

Have you double checked the attachment directions on both parts?

Dont go with @Proville6 method if u wanna soft physics. Try putting this script to each part to fix this issue.

local Players = game:GetService("Players")
Players.PlayerAdded(function(plr)
script.Parent:SetNetworkOwnership(plr)
end)


I made the platform myself, using a prismatic constraint, as you can see the attachments are aligned if they weren’t none of the platforms would be working, also i should point out that the stuttering when i switch to server, it runs smoothly

2 Likes

why would only 1 platform in a specific direction be having ownership issues and not all the others?

It is not direction based, it is based on distance and if server owner kind of not smooth

like i said, it’s clearly not distance related

there are platforms both closer and further away from the character and they all run smoohtly, i would show you but the forum gives me an error when i try to upload the image