|
| 07 Sep 2017 05:57 PM |
for i,v in pairs(game.Players:GetChildren()) do v.PlayerGui:WaitForChild("Main_UI").Book_Page.Visible = true end
"Infinite yield possible on "PlayerGui:WaitForChild("Main_UI").Book_Page""
How do I fix this? The script keeps breaking at this line, it works in studio, but breaks in game. |
|
|
| Report Abuse |
|
|
LaeMVP
|
  |
| Joined: 24 Jun 2013 |
| Total Posts: 4416 |
|
|
| 07 Sep 2017 05:59 PM |
| you use GetPlayers on the Players service, Main_Ui wasn't found in the default time WaitForChild waits |
|
|
| Report Abuse |
|
|
|
| 07 Sep 2017 06:33 PM |
wait(20) -- Player load in
for i,v in pairs(game.Players:GetPlayers()) do v["PlayerGui"]["Main_UI"]["Book_Page"].Visible = true end
I don't think it should matter since I gave like 20 seconds to load in and it said, "Main_UI is not a valid member of PlayerGui" |
|
|
| Report Abuse |
|
|
| |
|
|
| 08 Sep 2017 09:53 PM |
If FilteringEnabled is on, turn it off. Problem solved.
That isn't to say that there aren't any other problems with the code that you posted, though.
|
|
|
| Report Abuse |
|
|