Scripting a SurfaceGUI with an Adornee not working?

Hi, I have been trying to look for an answer, but cannot find anything online.

I have a Kiosk, and the SurfaceGui is in StarterGui, and is adorned to the Kiosk Screen.
image
image

The script is the “1.updated” script as seen in the image.

My issue is that when I run the script, when the SurfaceGui is adorned to the screen, and is in StarterGui, it doesn’t work.
HOWEVER, if the SurfaceGui is on the actual screen part, in the Workspace, the script does work correctly.

Is there something with SurfaceGui’s and Adornee’s, that explains why the script won’t work?

there are no errors, and everything is being referenced correctly.

Not 100% sure here since you didn’t provide any code, but this might be an issue because the contents of StarterGui get’s cloned to a Player’s PlayerGui whenever they respawn (or spawn for the first time). I’ve seen issues where the Adornee property get’s set to nil during this process

thank you for bringing this to my attention. Ill take a look.