local player = game.Players.LocalPlayer local pgui = player:WaitForChild('PlayerGui') local sgui = pgui:WaitForChild('songGui')
It happens on line 3, help will be greatly appreciated
An infinite yield is a warning that warns that you that a script might wait forever to wait for a child that either hasn't loaded in, is non-existent, or is parented somewhere else.
This normally occurs when you use WaitForChild(without the timeOut parameter specified), when WaitForChild exceeds 5 seconds and can't find the GUI, it'll print an infinite yield warning.
A way to avoid this is to specify the timeOut parameter. WaitForChild will wait the amount of seconds in the timeOut parameter, if it can't find the GUI, WaitForChild will return nil.
You should make sure you're searching for the GUI under the correct parent with the correct name
The script is infinitely yielding on the function :WaitForChild() because songGui isn't a child of the PlayerGui
The :WaitForChild() function yields until it finds the child with the name specified, if it doesn't ever find the child with the name specified, it yields infinitely.