Hi guys! thanks for watching the video. Have fun!
-{[(Script)]}-
-- LoopAnimationWithDelayScript
-- This script is designed to loop an animation with a 0.5 second delay after each loop.
-- It should be attached to an Animator instance within a Humanoid or AnimationController.
local animator = script.Parent -- Assuming this script is parented to an Animator instance
-- Function to play the animation
local function playAnimation(animationId)
local animation = Instance.new("Animation")
animation.AnimationId = animationId
local animationTrack = animator:LoadAnimation(animation)
animationTrack:Play()
animationTrack.Stopped:Wait() -- Wait for the animation to stop
task.wait(0.5) -- Wait for 0.5 seconds before the next loop
animationTrack:Destroy() -- Clean up
end
-- Example animation ID, replace with your actual animation ID
local animationId = "rbxassetid://17242301318"
-- Loop the animation with a delay
while true do
playAnimation(animationId)
end
Discord:
https: //discord.gg/ 5XBeYTuska
remove the spaces
21 апр 2024