Hello! I was playing a game early, which involved taking a plane ride. It moved by its own (it had a scripted movement and follow a certain path, I assume checkpoints)
How would you go about using this? I though of TweenService but when the plane turns in needs to rotate a bit, this can be done with TweenService but it’s just a tedious process. Does anyone have ideas?
2 Likes
Use AlignPosition and AlignOrientation, with checkpoints, yes.
3 Likes
So I made this script:
local current = 0
local function change()
current += 1
script.Parent.AlignPosition.Attachment1 = game.Workspace.Checkpoints:FindFirstChild(current):FindFirstChild("Attachment")
script.Parent.AlignOrientation.Attachment1 = game.Workspace.Checkpoints:FindFirstChild(current):FindFirstChild("Attachment")
end
local function checkIfNear()
if (script.Parent.Position-game.Workspace.Checkpoints:WaitForChild(tostring(current)).Position).Magnitude < 5 then
print("location")
change()
end
end
change()
while task.wait() do
checkIfNear()
end
But it doesn’t turn out smooth, you can see it stop at every checkpoint:
https://gyazo.com/0db59ba381faa2ae92cfb577a31c9ca3
How would I make it move at a consistent pace moving through the checkpoints without stopping.
1 Like
I’m not sure about that. I suggest playing with the propertues at runtime to see which one affect responsiveness.