1 | --this is a localscript that is located in TextButton (parent parent parent parent of it is in StarterGui) |
2 |
3 | local PlaceTeleportService = game:GetService( "TeleportService" ) |
4 |
5 | local RacingGame_ID = 3275910351 |
6 | script.Parent.MouseButton 1 Click:Connect( function () |
7 | PlaceTeleportService:TeleportToPlaceInstance(RacingGame_ID,game.Players.LocalPlayer) |
8 | end ) |
when i teleport it shows me that racing game does not exist however it exists
The TeleportToPlaceInstance function in TeleportService will only teleport a player to another server instance in your game. If you want them to teleport to a different game, then use the function Teleport. Hope this helped!