Alright, So I’m Currently Making Something For My Game I’m Using WaitForChild("")
For The UI But When I Play It Shows The Error “Infinite Yield Possible On LoadingScreen”.
When I Check The PlayerGui ( Where I’m Putting The WaitForChild ) It Shows That It’s There And It’s Still Saying Infinite Yield Which Completely Breaks The Code.
Try something like this, I ain’t sure if it’s correct though.
local StarterGui = game:GetService("StarterGui")
local LoadingScreen = StarterGui:WaitForChild("LoadingScreen")
-- code here
Example:
local StarterGui = game:GetService("StarterGui")
local LoadingScreen = StarterGui:WaitForChild("LoadingScreen")
-- if its a frame do
LoadingScreen.Visible = true
-- if its a guiholder thing do
LoadingScreen.Enabled = true