Advertisement
ILovePotato

Untitled

Jan 22nd, 2025
11,477
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. -- Get the Player's Character and Humanoid
  2. local player = game.Players.LocalPlayer
  3. local character = player.Character or player.CharacterAdded:Wait()
  4. local humanoid = character:WaitForChild("Humanoid")
  5.  
  6. -- Create the Animation and Sound
  7. local animationId = "rbxassetid://16944345619" -- Replace with your animation ID
  8. local soundId = "rbxassetid://16944654440" -- Replace with your sound ID
  9.  
  10. -- Load Animation
  11. local animation = Instance.new("Animation")
  12. animation.AnimationId = animationId
  13. local animationTrack = humanoid:LoadAnimation(animation)
  14.  
  15. -- Play Animation
  16. animationTrack:Play()
  17.  
  18. -- Create Sound
  19. local sound = Instance.new("Sound")
  20. sound.SoundId = soundId
  21. sound.Parent = character
  22. sound:Play()
  23.  
  24. -- Optional: Clean up sound after it finishes
  25. sound.Ended:Connect(function()
  26. sound:Destroy()
  27. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement