I'm trying to get this idle animation for my gun to load, but it keeps giving me the "Unable to cast value to object" error. I'm not sure how to go about with this error, and I don't know where to start to solve this issue.
tool.Equipped:Connect(function(mouse) Equipped = true local h = Player.Character.Humanoid:LoadAnimation("Idle") h:Play() end
It sends me to this block of code every time it gives me the error. So this is the point where I am stuck. Mind helping me?
I couldn't use the name "Idle" as a string for the animation. I had to put in the actual animation object within the gun.