Advertisement
ILovePotato

Untitled

Jan 22nd, 2025
18,751
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. -- Settings
  2. local animationId = "rbxassetid://18462892217" -- Replace with your animation ID
  3. local soundId1 = "rbxassetid://18460952794" -- Replace with your first sound ID
  4. local soundId2 = "rbxassetid://18460893321" -- Replace with your second sound ID
  5. local character = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait() -- Get the player's character
  6. local humanoid = character:WaitForChild("Humanoid")
  7.  
  8. -- Load Animation
  9. local animation = Instance.new("Animation")
  10. animation.AnimationId = animationId
  11. local animator = humanoid:WaitForChild("Animator") or Instance.new("Animator")
  12. animator.Parent = humanoid
  13. local animationTrack = animator:LoadAnimation(animation)
  14.  
  15. -- Load Sounds
  16. local sound1 = Instance.new("Sound")
  17. sound1.SoundId = soundId1
  18. sound1.Parent = character.HumanoidRootPart -- Assuming sound plays from the HumanoidRootPart
  19.  
  20. local sound2 = Instance.new("Sound")
  21. sound2.SoundId = soundId2
  22. sound2.Parent = character.HumanoidRootPart -- Assuming sound plays from the HumanoidRootPart
  23.  
  24. -- Play Animation and Sounds
  25. animationTrack:Play()
  26.  
  27. sound1:Play() -- Play first sound when animation starts
  28.  
  29. -- Wait for 4 seconds before playing second sound
  30. wait(4)
  31.  
  32. sound2:Play() -- Play second sound after 4 seconds
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement