Im making this game on roblox, and I cant seem to find a way to make my button teleport the player. This is the code I want to put the teleport into:
local function OnClicked()
script.Parent.Parent:Remove()
end
script.Parent.MouseButton1Click:connect(OnClicked)
Its part of a menu, where when you click the button, its supposed to close out the GUI and teleport you to an XYZ coordinates. I have the part to close out the GUI, but I cant find out how to make to teleport the player!

2 comments
Thanks! It took me a minute to find out how it worked, but I finally found out how it worked, thanks!
Happy it helped :)