For my horror game, i want to add sound effects to my game to make it more scary but i need help with a script
The sound effect i want to use is:
https://web.roblox.com/library/2139510606/Monster-Roar-Sound-Effect
And I want it to play every 20 seconds
Any help? Anything will be helpful :)
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