I apologize for necro posting but do you still need help with stopping the jittering of other players? I spent 10 hours trying to figure it out and I managed to stop it from happening.
If not this will be helpful for future readers.
In order to stop other players from jittering you must have the player who you see as jittering calculate a relative CFrame from the root of the train to their humanoidrootpart on their client after the train CFrame changed and then fire that relative value to the server where other clients can use it to determine that player’s location on the train.
Example:
Player Client:
HumanoidRootPart.CFrame = Rel * HumanoidRootPart.CFrame – setting player cframe
TrainEvent:FireServer(HumanoidRootPart.CFrame:ToObjectSpace(TrainCFrame)) – firing to server
Server:
TrainEvent.OnServerEvent:Connect(function(PlayerSent, Bool, CFrameSent)
local CharSent = PlayerSent.Character
if CharSent then
CharSent:FindFirstChild(“TrainPosition”).Value = CFrameSent
end
end)
Then inside your player client script have a something that searches through all the player’s characters with a for i,v in pairs loop and if that player is touching the train set their v.Character.HumanoidRootPart.CFrame to TrainCFrame* RelativeCFrame.Value:Inverse() – you may or may not need inverse(), I personally needed it for my case.
Note: I have CFrame values stored on every player’s character and when the server changes, It automatically changes it on every client
This will stop other players from jittering on your screen
Edit: some people are still confused so I added this very low effort scrap code that works. A bit hard to read and understand because I made it with old code in like 20 minutes but it works and you may use it how you wish.
it only jitters when you’re not inside the transparent part because thats how the script detects you’re on the “train” (I used touching parts not raycast)
nojittertest.rbxl (55.8 KB)