i made a idle animation for a tool and when i use it in studio it works. but when i use it ingame, it doesnt work at all i dont know at all what to do it get it to work, like if i need to do some extra coding or if the problem lies within the code itself. im fairly new to this in general so i have no idea
the code i use for it, not sure if i need to add anything else for it to show in game. if i need to do extra coding outside of the tool, how do i do that?
script.Parent.Equipped:connect(function()
local idle = script.Parent.Parent.Humanoid:LoadAnimation(script.Idle)
idle.Priority = Enum.AnimationPriority.Action
idle:Play()
script.Parent.Unequipped:connect(function()
idle:stop()
end)
end)

2 comments
open the Dev Console in roblox so that you see what is the problem. The Developer Console (or Dev Console for short) is a special window that can be accessed by pressing F9 on a standard keyboard, or typing /console in the Chat. It allows any user to view errors coming from the Client, and the game owner to view errors coming from the server.
Cant Upvote but nice question. Use dev console in game to see the problem. Hope this helps