Hello all, I am creating a sort of character GUI where when the button is pressed, the script calls for a model in the StarterPlayer called "StarterCharacter1", then changes the name of the model to "StarterCharacter", and kills the player so they respawn as said character. When this respawn happens, the script is also supposed to destroy the "Frame", which is "script.Parent.Parent:Destroy()" It doesn't seem to work, and Menu is underlined and it won't show up in my output as to why, so I am asking for help! Thanks!
local Menu = script.Parent.Parent
script.Parent.MouseButton1Click:Connect(function()Menu.Visible = true
game.Players.LocalPlayer.Character.Humanoid.Health = 0
game.StarterPlayer.StarterCharacter1.Name = "StarterCharacter"
script.Parent.Parent:Destroy()
end)

2 comments
Line 1 has a period at the end
Okay, removed that. Sorry LOL, But it doesn't work even without that.