Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Infinite Yield Possible ?

Asked by 6 years ago

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)
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 g1o2r3d4a5n6 350 — 6y
0
Do you have a script named 'ModePicker' in ServerScriptService? Is this script a local script or server script? awesomeipod 607 — 6y
0
awesomeipad Yes, Its A Server Script GizmoProductions 61 — 6y
0
Btw g1o2 I put a comment in the thing you helped me with, sorry about that. I’m kinda new to this website.. GizmoProductions 61 — 6y
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. Knineteen19 307 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

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

0
KingLoneCat thanks for assisting me but I’ve double checked and everything is exactly what you said, I’ll investigate further GizmoProductions 61 — 6y
Ad

Answer this question