Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 10 years ago

i've tried

function onPlayerEntered

Game.Workspace.Sound.Play()

wait(100)

Game.Workspace.Sound.Stop()

But it didn't work.

1 answer

Log in to vote
0
Answered by
dyler3 1510 Moderation Voter
10 years ago
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.

0
Thank you! tennisdude10 5 — 10y
0
No prob :P dyler3 1510 — 10y
0
I just did it and it worked :D tennisdude10 5 — 10y
0
Great, glad to help :) dyler3 1510 — 10y
Ad

Answer this question