local i = script.Parent
local map = workspace.Map1.sa
function onButtonClicked()
local plr = game.Players.LocalPlayer
local character = plr.Character
character:MoveTo(map.Position)
script.Parent.Parent.Parent:Remove()
end
i.MouseButton1Down:connect(onButtonClicked)
Because I don't know much about the player properties I need help, Thanks!

2 comments
The script works great but the Gui won't be removed now Can you fix that please?
Note that Destroy() should used instead of Remove(), on your issue with the gui not being removed, you must have changed the hierarchy. (script.Parent.Parent.Parent isn't the Gui)