Dear Reader,
I am trying to make a script that changes the Parent of my GUI from the PlayerGUI back to the StarterGUI. When I attempt to do so, I got an error.
Please see the following code below.
function PlayerTouched(Part)
game.Players.LocalPlayer.PlayerGUI.BuyALC.Parent = game.StarterGUI
end
game.Workspace.ALC.RemovePurchase.Touched:connect(PlayerTouched)
I don't know how to fix this and I need help in doing so.
Thank you.

1 comment
Its not
PlayerGUI:, it'sPlayerGui". The Gui is not supposed to be all capital. Also, it is better to wait for PlayerGui. Like this: :WaitForChild("PlayerGui");