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

(SOLVED) Help with infinite yield possible error?

So I am getting this thing its not an error but it will just stop the script completely as soon as I press it.

Error or so:

13:39:05.478 - Infinite yield possible on 'Workspace.A318.PlaneKit.Plane.OtherParts.Body.Copilotseat.Seat.System.Seat:WaitForChild("CFM56-56 L")'

Code it is in:

kit = game.Workspace.A318.PlaneKit.Plane.OtherParts.Body.Copilotseat.Seat.System.Seat
system1 = kit:WaitForChild('CFM56-56 L')
system2 = kit:WaitForChild('CFM56-56 R')
ONE = script.Parent.Animation.Value.A:WaitForChild('Motor')
function onClicked()
system1.A.ON:Play()
system2.A.ON:Play()

2 comments

0

its a warning stating that CFM56-56 L isn't in the seat

0

using :WaitForChild('CFM56-56 L') will always say infinite yield possible. its stating that it isnt in the seat, its not something to worry about. it just means its waiting for the child (loading the game) so you cant do anything about it. this will happen for every wait for child.

1 answer

✓ Accepted answer

Infinite yield usually occurs when a ":WaitForChild('someName')" has been waiting for a while.

In your code, it's yielding infinitely because 'CFM56-56 L' is not inside your seat part (or kit).

Hope this helps.

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