Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I fix my arms being stuck in this animation? [SOLVED]

I am trying to make a default hands up animation and whenever I first pull out the gun everything is ok, but then when I go to unequip it that is where my problem is.

Here are some Gyazo to show the issue:

https://gyazo.com/e4872aca3f5543b42aff0246777e937d

tool.Equipped:Connect(function(mouse)
	print("Tool equipped!")
	mouse.Icon = "rbxassetid://3982173194"
	local hum = player.Character:FindFirstChild("Humanoid")
	local IdleAnim = hum:LoadAnimation(Animations.Idle)
	IdleAnim:Play()
end)
 
tool.Unequipped:Connect(function()
	mouse.Icon = ""
	local hum = player.Character:FindFirstChild("Humanoid")
	local IdleAnim = hum:LoadAnimation(Animations.Idle)
	IdleAnim:Stop()
end)

1 answer

My problem was that I was instancing the newer animation,inside the function, creating a new cache or whatever each time.

    local IdleAnim = hum:LoadAnimation(Animations.Idle)

So to solve this I just put this line outside the function, and then called the

:Play() :Stop()

inside the functions.

This discussion is preserved as it was. New answers, comments, and votes are closed.