Hello,
I created a moving platform using "BodyPosition and BodyGyro" it works perfectly as I wanted it to, however once the orientation of the model i changes it still works but a slight shift this product without any explanation.
Here is the model without orientation: https://gyazo.com/c341faf0bb52bb996ded9bb91d2dffa0
The trajectory of the platform is straight.
Here is the model once oriented differently: https://gyazo.com/305b1a7d8d51d4a9b4c0c9d3bb13bf42
The trajectory of the platform does not remain straight she's slightly drifted.
Here is the script used, which is placed in the model:
local model = script.Parent
local platform = model.Platform
local start = model.Start
local finish = model.Finish
local bodyPosition = platform.BodyPosition
platform.BodyGyro.CFrame = platform.CFrame
while true do
bodyPosition.position = start.Position
wait(2)
bodyPosition.position = finish.Position
wait(2)
end
and oddly if I place the orientation of the model on: 0, 45, 0 it works the trajectory remains quite straight, but not if I put: 0, 60, 0 for example. Anyone have any idea what's going on?
Thank you !

7 comments
i am beginner to script, i use this one with help roblox youtube tutorial, can you give me an example or something? thank you
I've edited my answer, it will continue to tween back and forth (as you wanted to) without the rotation issue!
Thank you so much for help me, but there is a script error: "Workspace.MovingPlatform.Script:16: Expected identifier when parsing expression, got ')' - Studio - Script:16 "
Ah, remove the comma from the 0 at the end of the TweenInfo. From 0, to 0
Thank you ! It works but the problem is that because of this, the character does not move with the platform and the movement is no longer as fluid as with the bodyposition: /
Okay, how about use BodyPosition, but use CFrame.Angles() as a way to constantly set the part rotation in order to prevent it from twisting? Like so: BodyGyro.CFrame = CFrame.Angles(XAngleInRadians,YAngleInradians,ZAngleInRadians)
oh ok , how to integrate it into the script?