I've seen a bunch of tutorials for how to make it so you teleport to a certain position but how do you do it for a game?
So, I'm trying to make a part which is the button, teleport you when you click it. Anyone know how to do it?
Insert this script inside a Part that obviously contains a "ClickDetector"
1 | local Part = script.Parent |
2 | local CD = Part.ClickDetector |
3 | local GameId = --Put your game ID here |
4 |
5 | CD.MouseClick:connect( function (Player) |
6 | game:GetService( 'TeleportService' ):Teleport(GameId, Player) |
7 | end ) |
;)