Ok so Basically i have this script i want inside a tool gun to play an Animation when the player is idle for a while (it does work but not with what i want the script to have)
the script does work but not with the “if-then” thing, i want it to play everytime when the humanoid isnt running.
if script.Parent.Parent.Humanoid.Running false then --faulty or wrong
debounce = false
script.Parent.Equipped:Connect(function(Mouse)
wait(8)
if debounce == false then
debounce = true
animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Idle)
animation:Play()
wait(1.5)
debounce = false
end
end)
script.Parent.Unequipped:Connect(function()
animation:Stop()
end)
script.Parent.Parent.Humanoid.Running:Connect(function()
animation:Stop()
end)
end
if possible even input a way to make it only play if it isnt running for a while, anyway help is apreciated.
hmmmm i dont know which tho, i will continue on trying stuff, thanks for tleling me that tho, ima try something else, i dont know what tho, i will try to check
yes i know, but thats not where the thing is wrong, that part is working, the thing where it goes wrong is that it only plays the animation once, but i want it to play everytime the player is away for over 14 seconds yk? thats what i tried to do
Add another “end)” . It might be because of the amount of brackets. For example, there is not enough of these brackets ( and these brackets ). Or too many brackets.
another end at the very end? i tried that and it seems like there is still something wrong, i believe there is a missing “end)” somewhere in the middle of the script
A game file so we can actually see where the humanoid and other things are located without you having to explain it. You don’t have to if it has parts of your game that you don’t want to show.