While wait Not working

I Want to make it so every 10 seconds it plays a sound

It dosent work

Tried searching on the internet and

btw this is a local script

while wait(10) do
	game.Workspace.Sound:Play()
	print("test")
	end
1 Like
  1. Use task.wait instead.
  2. Do not put wait inside the condition, instead use while true do wait(10) end
  3. Make sure to have an exit condition. I.e., something happens, then it should stop playing. Use break to stop it.

What does the Output view say, are there any errors?

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.