How do I make a gui that teleports you to a part?

So I want to make a teleport to spawn GUI that has a spawn image on it and when I click it, it teleports you to spawn (Not exactly to spawn, I want it to teleport to a part near spawn that I place), how do I make such thing?

I also heard that when making such a thing, the script should be specific for R6 or R15, I want the script to work for both R6 and R15 if that’s possible.

*Sorry If I ask a lot as I’m still new at scripting.

1 Like
Button.MouseButton1Click:Connect(function()
 >> Character:MoveTo(myPart.Position)

https://developer.roblox.com/en-us/api-reference/class/ImageButton
https://developer.roblox.com/en-us/api-reference/function/Model/MoveTo

1 Like

Did it work??? @Ghostinee