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)
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)
It could be that the animation hasn't loaded in yet. Don't know for sure tho