How do I i stop infinite yield

I have the EXACT same menu camera stuff in both of my games same everything but one of the games says infinite yield and doesnt go to the camera


this one works

image
this one doesnt work and its the same guis and everything it says yield and then after I press play it puts my camera to the camera in workspace when the camera is supposed to be there before that

3 Likes

“Infinite yield” means that you’re using :WaitForChild(), but the script isn’t finding the child that it needs to. So it says “infinite yield” to tell you that it gave up on waiting for it.

Minding showing your script?

Do you have anything named Workspace (folders, models, etc. that have the same name as the service)? Does the camera part still exist in-game? Have you tried changing the part name to something else?


the cams camera is in the workspace and there are no other object in the workspace with the same name

Can you show your explorer while in game?

1 Like

its missing the cammmss or either it is not able to load within about 8 seconds of the waitforchild call like above maybe show picture of explorer. something maybe removing the cammmss on runtime

Try :FindFirstChild() maybe? Sometimes it works

Heres a vid, you may be right about the cam block not being there but why? Why is the camera just getting deleted, it worked fine in the testing game

The camera part doesnt show up in the workspace when I play the game I have no idea why. And I don’t know how to make it load in

Holy crap guys after hours of trying I found out it was streaming enabled. I turned off streaming enabled and now its working fine but I feel like my game may not be safe without streaming enabled on? If I turn off streaming enabled will my game be more vulnerable for exploiters?

1 Like

No it shouldn’t that just loads items over time not all at once like it will if turned off

on the 2nd parameter thingy there is something called timeOut

local newcam = game.Workspace:WaitForChild("cammmss", math.huge)

The timeout by default is infinite, it just says Infinite yield possible even though it’s still searching for the part to load in.

Try this:

local newcam = workspace:FindFirstChild("cammmss")
if not newcam then
   return newcam
end
2 Likes

hello i dont know if this got solved but all you need to do is

The second number is a time out so after that amount of time it will stop searching 5seconds is usualyl enough but i think 8 is good if things slow down roblox usualyl says this because on default waitforchild seems to search infintly :sob:

Object:WaitForChild("something",8)