I'm not sure how to do this. I know I'm supposed to use sound:Play
but I don't know how to.
Help? Also, if you could explain it step by step it would be helpful.
First make the sound object variable. For example:
local mySound = game.Workspace.Sound --Or other location
Then use function :Play()
. Is just really easy to understand what it does:
Plays the sound.
Change your script like this:
local mySound = game.Workspace.Sound --Or other location mySound:Play()
Now when you play the game, the song will be played.
The function :Play()
Is used to play sound objects, similarly :Stop()
and :Pause()
stop and pause it.
So to play it:
local sound = -- // wherever it may be; sound:Play();
Or to pause it:
local sound = -- // wherever it may be; sound:Pause(); -- // sound:Stop();
Use the function
:Play()
on the sound object. For example:
workspace.Sound:Play()