is there a way to check for an infinite yield?
I'm trying to run a check on whether something exists or not and to solve the problem automatically in case of random glitches. I usually do this by checking whether a value is nil or not, but since it comes out as an infinite yield, I need a new way to check if the yield is infinite. what is the alternative for
| if <something> == nil then |
to check if for an infinite yield instead
here's the code btw
1 | if game.ServerStorage.maps:WaitForChild( "friendship_park" ) = = nil then |
2 | if game.ServerStorage:FindFirstChild( "friendship_park" ) = = nil then |
3 | local map_ 1 = game.Workspace.friendship_park |
4 | map_ 1. Parent = game.serverstorage.maps |
6 | local map_ 1 = game.Workspace.MapHolder.friendship_park:Clone() |
7 | map_ 1. Parent = game.ServerStorage.maps |
the output is
11:57:45.382 - Infinite yield possible on 'ServerStorage.maps:WaitForChild("friendship_park")'
11:57:45.384 - Stack Begin
11:57:45.385 - Script 'ServerScriptService.mainscript', Line 125
11:57:45.386 - Stack End