I am working on a game that I am considering using multiple places instead of keeping things in one place i have a problem in teleporting players to a different places in the game, I used TeleportService in my script and it worked but the problem that it teleport the player to a place that is not in the same server so if two players ether if they are friends or not teleported to the second place they will not meet each other in the place that they teleported to, because Roblox will try to fill all the servers so the players will be separated, i saw that in many games where the players in same game can follow each others through the portal that leads to another place and they will stay in the same server and if they go back where they were they will see the same players they was with.
i don't if the script help but i will put it anyway :
local TeleportService = game:GetService("TeleportService") local placeID_1 = 4092151605 local function onPartTouch(otherPart) local player = game.Players:GetPlayerFromCharacter(otherPart.Parent) if player then TeleportService:Teleport(placeID_1, player) end end script.Parent.Touched:Connect(onPartTouch)
What I think your trying to do is, teleport the player to somewhere else in your game, and Not teleport the player to a different level. What your doing right now is to tp a player to a different game. Hooking into the event differently might help.
Edited Code:
local TeleportService = game:GetService("TeleportService") local Place = 3137936084 script.Parent.Touched:connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player then TeleportService:Teleport(Place, player) end end)
Make a part copy the position of the part
put this script in part
function onTouched(hit) local human = hit.Parent:findFirstChild("HumanoidRootPart") brick = script.Parent if (human ~=nil) then human.CFrame= CFrame.new(Vector3.new(POSITIONHERE!)) end end script.Parent.Touched:connect(onTouched)