Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Does anyone know how to make a script which will play a sound every 20 seconds?

1 answer

✓ Accepted answer

In order to do it, you need to know what is a while loop

  • So basically a while loop is a loop that goes on forever until you break the loop
local Sound = Instance.new("Sound") -- We will create a new sound using Instance new
Sound.SoundId = "rbxassetid://2139510606" -- we will set the id of the sound to that
Sound.Parent = script.Parent -- You need to set the parent of the Sound, if not it won't work
while wait(20) do -- so basically the script will wait for 20 seconds then do whatever we told it to do
Sound:Play() -- we will play the sound
end

2 comments

0

Btw, this is not a request site so try to do it your self next time and if you have any error then ask it here

0

I understand

This discussion is preserved as it was. New answers, comments, and votes are closed.