Paired Teleport Pads for Two Rooms thumbnail
0 views0 copies0 likes

Paired Teleport Pads for Two Rooms

Universal script

Copy it, then test it in your own Studio place.

Utilities Verified

Script code

19 lines · 0.7 KB
Download
local a = workspace:WaitForChild("PortalA")local b = workspace:WaitForChild("PortalB")local Players = game:GetService("Players")local last = {}local function connect(from, to)	local prompt = Instance.new("ProximityPrompt", from)	prompt.ActionText = "Travel"	prompt.ObjectText = from.Name	prompt.Triggered:Connect(function(player)		local character = player.Character		local now = os.clock()		if not character or (last[player] and now - last[player] < 1.5) then return end		last[player] = now		character:PivotTo(to.CFrame + Vector3.new(0, 4, 0))-- …open Get script for the full source

About this script

Add anchored parts called PortalA and PortalB to Workspace. Approaching either reveals a prompt that moves only the interacting character to a clear position above the opposite pad. A cooldown checked on the server prevents repeated input from bouncing a player back immediately. Leave room above each pad and test the exit with the largest avatar shape allowed by your experience.

Comments

Share what works, ask questions, or report an issue.

0

Log in to leave a comment.

No comments yet

Be the first to share your thoughts!

Raw Luau source

local a = workspace:WaitForChild("PortalA")
local b = workspace:WaitForChild("PortalB")
local Players = game:GetService("Players")
local last = {}
local function connect(from, to)
	local prompt = Instance.new("ProximityPrompt", from)
	prompt.ActionText = "Travel"
	prompt.ObjectText = from.Name
	prompt.Triggered:Connect(function(player)
		local character = player.Character
		local now = os.clock()
		if not character or (last[player] and now - last[player] < 1.5) then return end
		last[player] = now
		character:PivotTo(to.CFrame + Vector3.new(0, 4, 0))
	end)
end
connect(a, b)
connect(b, a)
Players.PlayerRemoving:Connect(function(player) last[player] = nil end)