i accidentally deleted the first version so im too lazy to explain it all so heres the quicky
so i made a "SoundBrick" and its supposed to play a sound , then check if the player is five times the position (in x y or z) of the brick , if it is then the song should stop . i think i might've messed up on the coding but remember this is my first time using sound and Positions soooo idk
if you have any more questions on what i did or the placement is or something just ask ,-,
brick = script.Parent.Position.position
local player = script.Parent.BodyPosition.position
function onTouch()
script.Sound:Play()
wait(40)
if
brick < player * 5
then
script.Sound.Stop()
end
end
script.Parent.Touched:connect(onTouch)

3 comments
wait() is deprecated too, why didn't you correct him?
The global namespace wait() itself is not deprecated. The RBXScriptSignal :wait() is though, and was replaced with :Wait().
^Like how :connect() was replaced with :Connect().