Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to play a new music using scripts?

Asked by 3 years ago

I need know how to play a music using a script like: Wait (5) now the script to start a music

0
superaceCZ u need the roblox song id and do the following thing then luxkatana 61 — 3y

2 answers

Log in to vote
0
Answered by 3 years ago

Just add :Play() at the end of the sound. For example:

local sound = Instance.new("Sound")
sound.Parent = game.Workspace

sound:Play()

https://developer.roblox.com/en-us/api-reference/function/Sound/Play

Ad
Log in to vote
0
Answered by 3 years ago

Its easy First of all make a folder with all songs and name it.

Second, make a script inside the folder if you want or insert it in serverscript

Here is the code.

local location = game.Workspace.Folder

location.song1:Play() -- Starts the song
wait(60) -- Wait 60 seconds
location.song1:Stop() -- Stops the song

Remember You can edit all properties, like song duration, if loop or not etc.

Answer this question