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

The Tool Animations will not play?

I've been working on Animation's for some Weapons, I had them in a game that wasn't published and when I added them to the Weapon they worked fine every single time I test them and edited it.

Yet when I move the Weapon / Animations to the Published game, Animations will not Play half the time. Now In the Output I'm not getting any Error or Notice that could lead me to why it isn't working. Sometimes it does work in the Studio, it'll play but Never in the Actual Game?

It may sound kinda confusing, Here's the Script for the Animation, Any help would be nice.

script.Parent.Equipped:Connect(function(Mouse)
	Mouse.Idle:Connect(function()
	local	animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Idle)
		animation:Play()
	end)
end)

script.Parent.Equipped:Connect(function(Mouse)
	Mouse.Button1Down:Connect(function()
	local	animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Deflect)
		animation:Play()
	end)
end)

1 comment

0

If Anyone Would Like I can Provide a Video of what I mean

2 answers

you forgot two brackets. I added them

script.Parent.Equipped:Connect(function(Mouse)
    Mouse.Idle:Connect(function()
    local   animation = 	game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Idle)
    	animation:Play()) -- bracket 1
	end)
end)

script.Parent.Equipped:Connect(function(Mouse)
    Mouse.Button1Down:Connect(function()
   local   animation = 	game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Deflect)
      animation:Play()) -- bracket 2
    end)
end)

1 comment

0

Oh Thanks I'll add those in when I get on again.

It could be that the animation hasn't loaded in yet. Don't know for sure tho

1 comment

0

I waited it, Doesn't Seem to be a Loading Issue? I'm not getting an Error about Not Loading.

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