Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a script pause while in midair?

Asked by 5 years ago

I made this script for a model that the player is supposed to be able to ride, however, I don't know if this is the most efficient way.

while true do
    script.Parent.Velocity = script.Parent.CFrame.lookVector*28
    wait(0.2)
end

Right now the movement works fine, but when in midair, it still preforms the script, so it just does flips. I would like the script to stop while in midair, but continue in the same direction at the same speed so that it behaves like a normal moving object would in real life.

0
try using a body position the8bitdude11 358 — 5y

Answer this question