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

The Tool Animations will not play?

Asked by 6 years ago
Edited 6 years ago

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)

0
If Anyone Would Like I can Provide a Video of what I mean Whiteheart12212 2 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

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)
0
Oh Thanks I'll add those in when I get on again. Whiteheart12212 2 — 6y
Ad
Log in to vote
-1
Answered by 6 years ago

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

0
I waited it, Doesn't Seem to be a Loading Issue? I'm not getting an Error about Not Loading. Whiteheart12212 2 — 6y

Answer this question