O_O what is it and which msg??
Instead of using > use == on the speed if statement. You would use > if you were moving.
you want it to play animation after 8 seconds of holding a tool and not moving right?
ye boi, i was about to ask, how do i write that condition?
give me one second, I’m going to script that
is the animation set to Loop? .
nope, not yet, let me just make it looped real quick
in case you don’t know you need to do that in the animation editor
ye i maed the animation myself, thanks anyway!
ok i looped the animation, wat now?
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
local tool = script.Parent
local idleAnimation = ...
local isIdle = false
local isToolEquipped = false
-------------------------------------
local function playIdle()
if isIdle == true and isToolEquipped == true then
print("Idle will start in 8 seconds!")
wait(8)
local idleAnimTrack = hum:LoadAnimation(idleAnimation)
idleAnimTrack:Play()
end
end
hum.Running:Connect(function(speed)
if speed == 0 then
isIdle = true
playIdle()
else
isIdle = false
for i, v in pairs(hum:GetPlayingAnimationTracks()) do
v:Stop()
end
end
end)
tool.Equipped:Connect(function()
isToolEquipped = true
playIdle()
end)
tool.Unequipped:Connect(function()
isToolEquipped = false
for i, v in pairs(hum:GetPlayingAnimationTracks()) do
v:Stop()
end
end)
Try this, didn’t test so I can’t say it’ll work
Don’t forget to fix the animation object path by the way
let me fix one thing (30 chars)
oh you mean script.parent.Idle
I did a small fix to the script, when you stop running and you’re holding the tool, it should print “Idle will start in 8 seconds!”
ok, it sseems like most of it is working already, let me just input it and i will inform you
yo check this out O_O (happened after qeuipping 1x)
hummmmmmmmmmmmmmmmmmlet me see
uhhhhhhhhhhhhhh when unequipping the tool, it just plays the default run animation even tho im not moving lol
imma create an animation and a tool and test it in my game, I’ll hit you up when I fix it (if I do lol)