Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would you do a idle animation, if you have a weapon out?

I know how you play an animation:

local animation = Instance.new("Animation")
2	animation.AnimationId = "http://www.roblox.com/Asset?ID=144884906" -- ID here
3	 
4	local animTrack = Humanoid:LoadAnimation(animation)
5	animTrack:Play()

But how would I do it if this animation occured when your character isn't moving and will continue to occur providing they are not moving, (Maybe a:)

while true do 

Or something like that.

1 answer

✓ Accepted answer
moving=false
Humanoid.Running:connect(function(value)
if value>0 then
moving=true
else 
moving=false
end)

while wait() do
if not moving then
--play your animation
end
end

1 comment

0

Where would I put this script?

This discussion is preserved as it was. New answers, comments, and votes are closed.