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

How do i make a sound play for any given amount of time, then stop?

i've tried

function onPlayerEntered

Game.Workspace.Sound.Play()

wait(100)

Game.Workspace.Sound.Stop()

But it didn't work.

1 answer

function onPlayerEntered()
Game.Workspace.Sound:Play()
wait(100)
Game.Workspace.Sound:Stop()
end

game.Players.PlayerAdded:connect(onPlayerEntered)

You had a few errors. I fixed them.

4 comments

0

Thank you!

0

No prob :P

0

I just did it and it worked :D

0

Great, glad to help :)

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