Is there any way to yield the current thread until something happens?
For example,
game.Workspace:WaitForChild("Part")
will yield the thread until a child named 'Part' is added. Is there any other way to yield the thread?
You could do something like
while true do newPart=Workspace.ChildAdded:Wait() if newPart.Name=="Part" then break end end
Hope this helps.
Yes, there is. You can use "repeat". For example:
repeat --whatever code you want to repeat until x.Value == 30 --change this to whatever you want it to repeat until
I hope that answers your question! If so, please upvote and accept this answer.
Locked by adark and Shawnyg
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?