How would I add a wait time for a animation to stop for a certain time? After it played once.
Here’s the script:
local animation = script:WaitForChild(‘Animation’)
local humanoid = script.Parent:WaitForChild(‘Humanoid’)
local dance = humanoid:LoadAnimation(animation)
dance:Play()
The script isn’t mine, I was just wondering how I would add the wait time. I know this is maybe a simple answer so I thank you in advance if you can help.
local animation = script:WaitForChild(‘Animation’)
local humanoid = script.Parent:WaitForChild(‘Humanoid’)
local dance = humanoid:LoadAnimation(animation)
dance:Play()
wait(1) --set this to anything
dance:Stop()
If you want to pause it:
local animation = script:WaitForChild(‘Animation’)
local humanoid = script.Parent:WaitForChild(‘Humanoid’)
local dance = humanoid:LoadAnimation(animation)
dance:Play()
wait(1) --whatever
dance:AdjustSpeed(0)
wait(1) --whatever
dance:AdjustSpeed(1)
Thank you it works! But, when it plays through the first time it goes back to the normal time and doesn’t stop. Would I have to put a loop at the bottom? so it can repeat it’s self? If Yes how would it look like? Sorry to bug you again.
I don’t know what you are asking, but if you mean the dance starts back at the time position 0 (like when it first started) then use the second example I gave.