#What you could do?
Use a while loop. This loop's purpose is to loop infinitely until it's false or broken.
#While Loops
While loops are most commonly seen in this form: while true do because the code you put between the while and do acts like an if statement. If we can add a wait like you do, the loop will run every time the wait is over.
while wait() do end
We can do actual full if then statements in between while and do:
while workspace.Part.BrickColor == BrickColor.new(1) do end
After the statement is false the loop will never run again. You need to use a function or something like that to use it again.
#Final Product
while wait(1) do
script.Parent.Text = workspace.Sound.Name
end
##Version 2
local a = true
while wait(1) do
if a then
script.Parent.Text = workspace.Sound.Name
else
break
end
end
Hope it helps!
1 comment
@Magic I would but to me the way I'm doing it is way easier, not the best scripter