It’s because you’re using StarterGui. You need to access the PlayerGui to edit GUIs, as StarterGui is just where the server stores GUIs.
And for proper function, this script should be a local script, and contain a debounce on the .Touched() event so that it doesn’t run like 100 times in one second (which is what would happen if there were no debounce).
Note: If you just put the local script in the gui, you don’t need to worry about “accessing the playerGUI” since you can just use script.Parent index method.