Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local sound = Instance.new("Sound")
- sound.Parent = game.Workspace
- sound.SoundId = "rbxassetid://18460952794" -- Replace with your sound ID
- sound.Looped = false -- Ensures the sound doesn't loop
- sound:Play()
- -- Replace with your Animation ID
- local animationId = "rbxassetid://18462892217"
- -- Wait for the player’s character to load
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:FindFirstChildOfClass("Humanoid")
- if humanoid then
- -- Create and load the animation
- local animation = Instance.new("Animation")
- animation.AnimationId = animationId
- local animationTrack = humanoid:LoadAnimation(animation)
- -- Play the animation
- animationTrack:Play()
- -- Optional: Adjust speed or loop settings
- animationTrack:AdjustSpeed(1) -- Normal speed
- animationTrack.Looped = false -- Makes the animation loop
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement