Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Infinite Yield Possible ?

I'm Having A Problem With This Piece Of Code And How Do I Fix It To Make It Execute The Rest Of The Code

" Infinite Yield Possible On ' ServerScriptService:WaitForChild('ModePicker') "

I Marked The Point Of Code Btw

Main = script.Parent.Parent

game.Workspace.NumberPlayers.Changed:connect(function()
	wait(0.5)
	if game.Workspace.NumberPlayers.Value >= 1 then
(HERE -->)	game:GetService('ServerScriptService'):WaitForChild("ModePicker")
		game:GetService('ServerScriptService').ModePicker.Disabled = false
		game:GetService('SoundService').DrumRoll:Play()
		Main.PlayerGui.ModePickGUI.RoundShadow:TweenPosition(UDim2.new(0.314,0,0.343,0))
		wait(5)
		local Rand = game.Workspace.Mode.Value
		Main.PlayerGui.ModePickGUI.RoundShadow.DropShadow.Namez.Text = Rand
	end
end)

5 comments

0

when you use the advice someone already gave you on this website, you should at least say thanks or acept the answer, not just use it and ignore

0

Do you have a script named 'ModePicker' in ServerScriptService? Is this script a local script or server script?

0

awesomeipad Yes, Its A Server Script

0

Btw g1o2 I put a comment in the thing you helped me with, sorry about that. I’m kinda new to this website..

0

Whenever it says infinite yield possible, that just means it hasn't found what you're looking for yet, and it's still looking, so maybe you specified the path wrong, or you just typoed.

1 answer

Hi Gizmo,

Infinite Yield Possible just implies that the script might be forced to wait forever. So, when you use :WaitForChild(), you need to make sure that the name you add inside the parenthesis is correct and that the child exists under the parent which you use :WaitForChild() on.

##Hope I helped and have a great day/night.

Thanks,

Best regards,

~~ KingLoneCat

1 comment

0

KingLoneCat thanks for assisting me but I’ve double checked and everything is exactly what you said, I’ll investigate further

This discussion is preserved as it was. New answers, comments, and votes are closed.