So, like in RPG games, if you were to enter a house from it would put you at the beginning of the door. But, if you came in the back way, it would lead you in at the back door not the front door.
I would like this function, but with teleporting to another place, and grabbing the data of the teleport service, and you teleported from one part of the map, it would teleport you to the second place, but in a different location instead of the original spawn point. Like lets say there is a cave that leads to a town (The town is the different place), and a road that also leads to it, players heading through the road would be spawned at the road way they came from in the town. While players that went through the cave would be spawned by the cave entrance where they came from and into the town.
This is the first script to the first game. Basically if you click the part it teleports you to the game. script in click detector on a part
local TeleportService = game:GetService("TeleportService")
local placeID_1 = 4505065903
local placeID_2 = 4483453486
script.Parent.MouseClick:Connect(function(player)
TeleportService:Teleport(placeID_1, player,"Why")
end)
script.Parent.MouseClick:Connect()
local script in Startergui
local Data = game:GetService("TeleportService"):GetLocalPlayerTeleportData()
print (Data)
if Data == true then
wait(.1)
game.Players.Parent:FindFirstChild("Humanoid")
game.Players.Torso.CFrame = game.Workspace.Finish.CFrame + Vector3.new(-103.2, 108.7, -129.7)
end
This is the script to the second game. It is successful with printing "Why" in the output, but it doesn't move the player to the designated area...I really don't know how to go about this script, is there a better way to do this??? Or what I'm doing wrong at least?

1 comment
Updated my answer