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

My "Idle" animation on my localscript for my gun isn't working on roblox, but is on studio?

Asked by 4 years ago

I have a working "Idle" animation for my gun when I am testing it on Studio, but when I play the game on Roblox, it isn't working. here is the code I have for it in a local script in the tool:~~~~~~~~~~~~~~~~~ local plr = game:GetService("Players").LocalPlayer local char = plr.Character or plr.CharacterAdded:Wait() local h = char:WaitForChild("Humanoid") local anim = h:LoadAnimation(script.Parent:WaitForChild("Animation3"))

local tool = script.Parent

tool.Equipped:Connect(function() anim:Play() end)

tool.Unequipped:Connect(function() anim:Stop() end)

~~~~~~~~~~~~~~~~~

0
Do you own the animation yourself? If you don't, that might be causing the issue. IStarConquestI 414 — 4y
0
i do beargoespoopandpee 8 — 4y
0
Do you have any custom animations loaded onto your avatar? Perhaps they are taking a higher animationpriority than the tool's? I don't have any better ideas than that atm. IStarConquestI 414 — 4y
0
hmmm, good suggestion, ill check right now beargoespoopandpee 8 — 4y
View all comments (2 more)
0
No other animations taking priority, maybe there is a better way to script it? beargoespoopandpee 8 — 4y
0
The same thing happens to me. youtubemasterWOW 2741 — 4y

Answer this question