I feel like it's a simple thing, i just don't know how Help?
local player = game.Players.LocalPlayer
local sound = Instance.new("Sound",player)
sound.SoundId = "rbxassetid://"..531211690
sound:Play()
I feel like it's a simple thing, i just don't know how Help?
local player = game.Players.LocalPlayer
local sound = Instance.new("Sound",player)
sound.SoundId = "rbxassetid://"..531211690
sound:Play()
It is, very simple. All you would have to do is this:
Local Script - Place in StarterGui
local player = game.Players.LocalPlayer
local sound = Instance.new("Sound",player)
sound.SoundId = "rbxassetid://"..531211690 -- First
sound:Play() -- Plays the song.
wait(120) -- How long the song is.
sound:Destroy() -- Destroys the song.
sound.SoundId = "rbxassetid://"..531211690 -- Second
sound:Play() -- Plays the song.
wait(120) -- How long the song is.
sound:Destroy() -- Destroys the song.
UPDATE - Includes "sound.Ended:Wait()" from OldPalHappy
local player = game.Players.LocalPlayer
local sound = Instance.new("Sound",player)
sound.SoundId = "rbxassetid://"..531211690 -- First
sound:Play() -- Plays the song.
sound.Ended:Wait() -- Waits for the song to end.
sound:Destroy() -- Destroys the song.
sound.SoundId = "rbxassetid://"..531211690 -- Second
sound:Play() -- Plays the song.
sound.Ended:Wait() -- Waits for the song to end.
sound:Destroy() -- Destroys the song.
sound.Ended:Wait()
I recommend you look up very basic scripting tutorials on Youtube. Here is the link to their playlist. Hope this helps!
Accept this answer if this helps and don't forget to upvote!
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
To wait for a song to end on the client, use sound.Ended:Wait().
Updated it, thanks for reminding me.
Thanks very much