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

How do I MOVE an animation?

Asked by 8 years ago

I have this backflip animation script.

wait(1)

local player = game.Players.LocalPlayer
local Mouse = player:GetMouse()
local humanoid = player.Character.Humanoid --Humanoid
local s = humanoid:LoadAnimation(game.StarterPack.Howl.Animation)

Mouse.KeyDown:connect(function(key)
if key:lower() == "h" and humanoid then
    s:Play() 
end
end)


What I want is, obviously to make the player.. move.. (However many studs) Backwards. And move (How many studs) In the air. But Idk how to do that. Please help?

1 answer

Log in to vote
0
Answered by 8 years ago

All you have to do is move the HumanoidRootPart (as that stays stationary during the animation) according to how you would like the player to move.

In this situation, you would use the lookVector property of the CFrame to move the HumanoidRootPart backwards, and also apply a Vector3 offset to the CFrame to move the character in the air.

Ad

Answer this question