Teleporting Help

  1. What do you want to achieve?

A teleporting system like the game Islands, where you are at your “Island” and you can teleport to a different place or game where other players can go too. If you haven’t played if before this is the game: Islands

  1. What is the issue?

I do not know how to do this, do you spawn at your island when you play the game and then you can visit an entirely different game to visit players, or does the game have two places, the island, and town(where other players can visit) and you can teleport between those?

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I looked for a solution on google and the Developer Hub but didn’t find anything to what I am looking for.

It actually comes with a script. I mean, it is not that hard to script it. I definitely will tell you to look on youtube on how to do it as they walk through it step by step. It also depends on the type of spawners you are inputing.

What do you mean by spawners? And what would I search, I tried already and couldn’t find anything?

Not sure if islands uses teleport service or not, I’ll just write two seperate scripts.

local YourPlace = IDHere
local TeleportService = game:GetService("TeleportService")
local TeleportPartOrGui = YourPartOrGui

TeleportPartOrGui.Touched:Connect(function() -- MouseButton1Click if it's a GUI
      TeleportService:Teleport(IDHere)
end)

Position script

local Player = game.Players.LocalPlayer
local Character =  Player.Character
local RootPart = Character.HumanoidRootPart
local TeleportDestination = yourpart
local TeleportGUIorPart = yourpartorgui

TeleportGUIorPart.Touched:Connect(function() -- Mousebutton1click if it's a gui
      RootPart.Position = TeleportDestination.Position
end)

Let me know if this doesn’t work, have an amazing rest of your day/night!

Edit

For more info, read on

What I mean, is that the place where the player touches is like a tp pad. You can use the scripts posted above to see if those will fix the problem. :+1:

1 Like

Oh, there’s plenty of tutorials. Though I do recommend the Developer Wiki. Anyway, if you can’t be bothered to read it, watch the DevKing’s tutorial on TeleportService and the Positions is basically the most basic thing you could program. Oh, and I almost forgot, if you use the positions, make sure that your part’s cancollide option is off.

When you first join the game will it be your “Island” or will it be the town? Or does it not matter?

It depends on which is your start place, and for this I suggest teleport service and a 1 player server, the town could be a separate place - Don’t change anything if what you already have works perfectly fine, I was just showing you an easier method.

2 Likes

Okay, I think I got it, thank you for your help!

1 Like