Since this is a Gui, you should usually use a LocalScript as it prevents server lag from the Gui, and it is only happening for that Player.
Now, a better way to do this would be to connect the function right away, like so:
1 | script.Parent.MouseButton 1 Click:connect( function () |
Doing this can save a line, and a bit of time.
Your next error would be that you are going to the StarterGui instead of the PlayerGui, which can be done as so:
1 | Player = game.Players.LocalPlayer |
Everything else looks fine, good luck!