I currently am using a while true do loop to check if Part A is near Part B
while (partA is not near partB) do
wait()
end
I have multiple of these loops and I’m worried it may cause performance issues.
Is there a more efficient way to do this?
I currently am using a while true do loop to check if Part A is near Part B
while (partA is not near partB) do
wait()
end
I have multiple of these loops and I’m worried it may cause performance issues.
Is there a more efficient way to do this?
repeat wait() until a is near b
runService.HeartBeat:Connect(abfunction)
RunService events are more reliable or event-based waits or connections.