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

(SOLVED) Help with infinite yield possible error?

Asked by 4 years ago
Edited 4 years ago

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()
0
its a warning stating that CFM56-56 L isn't in the seat greatneil80 2647 — 4y
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. reidlab 2 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

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.

Ad

Answer this question