Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Settings
- local animationId = "rbxassetid://18462892217" -- Replace with your animation ID
- local soundId1 = "rbxassetid://18460952794" -- Replace with your first sound ID
- local soundId2 = "rbxassetid://18460893321" -- Replace with your second sound ID
- local character = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait() -- Get the player's character
- local humanoid = character:WaitForChild("Humanoid")
- -- Load Animation
- local animation = Instance.new("Animation")
- animation.AnimationId = animationId
- local animator = humanoid:WaitForChild("Animator") or Instance.new("Animator")
- animator.Parent = humanoid
- local animationTrack = animator:LoadAnimation(animation)
- -- Load Sounds
- local sound1 = Instance.new("Sound")
- sound1.SoundId = soundId1
- sound1.Parent = character.HumanoidRootPart -- Assuming sound plays from the HumanoidRootPart
- local sound2 = Instance.new("Sound")
- sound2.SoundId = soundId2
- sound2.Parent = character.HumanoidRootPart -- Assuming sound plays from the HumanoidRootPart
- -- Play Animation and Sounds
- animationTrack:Play()
- sound1:Play() -- Play first sound when animation starts
- -- Wait for 4 seconds before playing second sound
- wait(4)
- sound2:Play() -- Play second sound after 4 seconds
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement