This may soung like the most noobie question but i have tried this code but it just makes the sound repeatedly start
What could I use?
while wait() do
game.Workspace["Generator sound"]:Play()
end
This may soung like the most noobie question but i have tried this code but it just makes the sound repeatedly start
What could I use?
while wait() do
game.Workspace["Generator sound"]:Play()
end
game.Workspace["Generator sound"].Looped = true
game.Workspace["Generator sound"]:Play()
When I am in studio, the code works perfectly, yet when I am in game, the code seems to not work. What could be happening?
game.Workspace["Generator sound"].Looped = true
if not game.Workspace["Generator sound"].isLoaded then
game.Workspace["Generator sound"].Loaded:wait()
end
if not game.Workspace["Generator sound"].IsPlaying then
game.Workspace["Generator sound"]:Play()
end
Can you tell me if this fixes it?
game.Workspace["Generator sound"].Looped = true
if not game.Workspace["Generator sound"].isLoaded then
game.Workspace["Generator sound"].Loaded:wait()
end
game.Workspace["Generator sound"]:Play()
It did not fix it.
I updated the script. I think this will definitely fix it
This is a lock down approach, this should work no matter what lol
game.Workspace:WaitForChild("Generator sound").Looped = true
while not game.Workspace["Generator sound"].IsPlaying do
game.Workspace["Generator sound"]:Play()
end
I tried it- the problem was that something was not loading and this code fixed it.