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)

3 comments
I don't think you should use a loop when the input ends, try just pausing it without the loop.
thanks for the help but its still giving the error.
PlayAnim:Stop()