Hey There! So I’m trying to make it when a player touches a part they teleport to another game. I don’t completely understand where to put the other places ID for in this link it said to copy the whole link not just the ID
Teleporting Between Places | Documentation - Roblox Creator Hub
so could somebody help me make it so players teleport to another place when they touch the parent of this part?
local TeleportService = game:GetService("TeleportService")
local placeID_1 = 408502340
local placeID_2 = 408502380
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)
This script was from the link above.