Can you teleport characters from my game with teleport service?

As the title says, you know there are many games which have a character system etc…
which grant abilities in another place but apparently I don’t know how to teleport the player character with teleport service I mean, my game has a character store which gives abilities but the problem is that I don’t know how to teleport them to the other place with the character

TeleportService only works with real players, you will need to add the characters from game A to game B.

Are you talking about teleporting between places? If so, there’s several ways you can do this.

TeleportService | Roblox Creator Documentation

If your data can be represented or to the user known as a setting, such as the equipped ability, you can use TeleportService:GetTeleportSetting() and TeleportService:SetTeleportSetting() to set these values for a seamless transition to the new place. Then, on the client, send an event to the server to equip the item.

Another option is TeleportData. This is used in many teleport functions (if not all), where you can set data to teleport along with the player. On the server, you can detect the data using Player:GetJoinData() and then access it using JoinData.TeleportData.

hey, by any chance do you have the documentation of universes, that is, everything that has to do with the same place?

Are you talking about DataModel or something else?

Hello, how about if you answer my new publication there I need your help:

Can you help me?

I guess the service you are referring to is TeleportService. To use it, you will need the plugin TeleportGui, which is in the plugin tab on Roblox.
Once you have TeleportGui, you will need a player to click on. You can do that by placing a part in the game and attaching a script to it. The script will be:
local module = {}

local part = script.Parent
local player = game.Players.LocalPlayer

part.Touched:Connect(function(hit)
if hit.Parent == player then
module:DoStuff()
end
end)

function module:DoStuff()
local success, result = pcall(function()
return TeleportService:TeleportToPlaceInstance(game.PlaceId, player, game.PlaceId)
end)

if not success then
    -- do stuff if teleporting fails
end

end

return module

I hope this helps!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.