The script does not find a GUI even if it's in the defined path

Ok, my issue is as simple as strange.

I have a script which is in a part.
When this part is touched, the player gets a tool, and a subtitle shows up in the player’s GUI, telling that the tool has been taken.
To avoid bugs, i’ve inserted a line of code which detects if another subtitle is showing up while the tool is taken, so the script will wait before the subtitle is shown.
(I’ve used as point of reference the subtitle’s background image: Subtitles_Roundify_8px)

My issue: the script does not find the gui (“Assistant”) where the other subtitles are shown.

Here’s the line of code i have troubles with:

script.Parent.Parent.Key1.Touched:Connect(function(gamer)
--[...]
       local player =  game.Players:GetPlayerFromCharacter(gamer.Parent)
       while player.PlayerGui.Assistant.Subtitles.Subtitles_Roundify_8px.ImageTransparency < 1 do			 
             wait(1)
       end
--[...]
end)

Here’s the output:
RobloxStudioBeta_OWTE5lHql3

“Assistant” is not found by the script, but… It’s there, as you can see here:
InkedRobloxStudioBeta_9rnwbyqZxe_LI

What could the problem be? :thinking:

The script can fire before any other objects are created. Add a wait for child. This will make the script wait for the object to be loaded in before continuing

PlayerGui:WaitForChild("Assistant")

It outputs another error:
RobloxStudioBeta_HqQ75ykn5D