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

Why does animation glitch and why does it not move forward after it plays the animation??

Asked by 6 years ago
Edited 6 years ago

What I want this script to do is to move forward every time it slides Example : npc -> wall -> at destination move->slide->come here But what it really does is this: move->slide->at destination -> goes back to beginning Plus what is weird is how my animation always glitches

local anim = script.SlideAnimation
local mouse = game.Players.LocalPlayer:GetMouse()
local hum = game.Players.LocalPlayer.Character.Humanoid
    mouse.KeyDown:Connect(function(key)  -- I know its depricated
    if key == "l" or key == "L" then
        local anima = hum:LoadAnimation(anim)
        hum.WalkSpeed = 0
        hum.JumpPower = 0
        anima:Play()
        wait(2.2)
        hum.Parent.Torso.CFrame = CFrame.new(0 , 0 , 0 + -5) --  Am I doing this correct??
        hum.WalkSpeed = 16
        hum.JumpPower = 50
    end
end)

Hopefully people who see this can answer

0
Use the humanoid and moveto() framed 1 — 6y
0
ok thanks saSlol2436 716 — 6y

Answer this question