hello, I crated a moving platform by tweening alignposition, and now im trying to switch it to client side. (because on the server side, the platform can leave the character behind due to server lag)
But, during this process, i ran into an issue.
(sorry for bad quality)
Like the video above, on the client side platform, the character isn’t sticking and gets pushed away little by little.
Whereas, on the server side, the character is sticking well.
Compliance properties of alignposition are as follows:
And basically script of server and client is like:
return function() --client side, call a module script on local script
local TWEEN = game:GetService("TweenService")
local part = script.Parent.Part
part.AlignPosition.Position = part.Position
part.Anchored = false
part:SetNetworkOwner(nil) --server side
TWEEN:Create(part.AlignPosition, TweenInfo.new(
4,
Enum.EasingStyle.Linear,
Enum.EasingDirection.InOut,
-1,
true
), {Position = (Vector3 Position) }):Play()
end
Additionally, I have found something here.
On the server side, the distance between position change of alignposition and platform movement is larger than on the client side one, And unlike the client side, when characrer gets on the server side platform, the body parts (like HumanoidRootPart) don’t receive any velocity (no changes on AssemblyLinearVelocity).
What is the cause of this issue, and how can i solve it?