Script thinks that there is no selected instance?

I was trying to fix an abandoned game and i saw this error for no reason…

image

Even when that instance was inside of PlayerGui.
When there is something on StarterGUI it will transfer to PlayerGUI but this thinks that it isn’t there.

image
photo of him on StarterGUI

I Have tried alot of solutions to fix it.

So, How do i fix this problem?

Anyways the script for it is here: (just a line)

player.PlayerGui.stay.Black.BackgroundTransparency = 0

1 Like

Try using :WaitForChild('stay').

1 Like

Okay i’m gonna see if it works.

1 Like

It really worked, Thank you so much.

1 Like