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

After a animation plays how would i get the player to move to where it ends?

Asked by 7 years ago

I've spent the last 2 hours trying to figure out some way of getting the player to move after a animation is played to where the animation ends. after the animation plays the players body slides back to the original location but i wanted it to stay at the end but the camera stays in the same location too. the animation is just a jump forward a longer distance power

repeat wait() until game.Players.LocalPlayer.Character

local Player = game.Players.LocalPlayer
local Char = Player.Character
local UIS = game:GetService('UserInputService')
local Played = false

UIS.InputBegan:connect(function(input)
    if input.KeyCode == Enum.KeyCode.Z and Played == false then
        Played = true
        local Anim = Instance.new('Animation')
        Anim.AnimationId = 'rbxassetid://842640909'
        local PlayAnim = Char.Humanoid:LoadAnimation(Anim)
        PlayAnim:Play()
        wait(1)
    Played = false
    end
end)

-- the jump jumps about 52 studs forward
0
You can't if you mean your making an animation that will take you off the coordinates. You would have to script it while animation plays BlackOrange3343 2676 — 7y
0
Animations are designed to be reversed and looped. You can try binding some events to a function that forces the final cframes. Might not work. Better off using actual physics. cabbler 1942 — 7y

Answer this question