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

Pause is not a valid member of AnimationTrack ?

Asked by 4 years ago

Hello I'm Am Not Sure Why Its Is Giving Me This The Thing That's Confusing Me Is Pause Is Supposed To Be A Valid Member?The Script is a LocalScript Inside Of StarterCharacterScripts Please Give Me Some Advice On What i Should Do.

local uis = game:GetService("UserInputService")
local Character = game.Players.LocalPlayer.Character.Humanoid
local anim = Instance.new("Animation")
anim.AnimationId = 'rbxassetid://5549362459' 
local PlayAnim = Character:LoadAnimation(anim)


uis.InputBegan:Connect(function(input)
    if input.KeyCode == Enum.KeyCode.LeftShift then
        Character.WalkSpeed = 21
        while true do
            wait(0.01)
          PlayAnim:Play()
        end
    end
end)

uis.InputEnded:Connect(function(input)
    if input.KeyCode == Enum.KeyCode.LeftShift then
        Character.WalkSpeed = 16
                while true do
            wait(0.01)
            PlayAnim:Pause()
        end
    end
end)

0
I don't think you should use a loop when the input ends, try just pausing it without the loop. XxGhostBoy_HDxX 38 — 4y
0
thanks for the help but its still giving the error. CallMe_Axis 63 — 4y
0
PlayAnim:Stop() bryan99354 30 — 4y

2 answers

Log in to vote
0
Answered by
Mroczusek 111
4 years ago

Please Don't Type Like This, It's Really Annoying.

It really depends on what you want to do, however, in your case, I think you should use :Stop()

Ad
Log in to vote
0
Answered by
zadobyte 692 Moderation Voter
4 years ago

You have to use :Stop() on animation tracks

Answer this question