I’m trying to make a teleporter where if a specific object with a name touches it, it teleports to the other teleporter. I have tried making and else if block.CFrame == nil then and so but still haven’t achieved it. Here is the script that I made and the explorer menu also:
local plrs = game:GetService("Players")
local tp1 = game:GetService("Workspace").TelePads1
local tp2 = game:GetService("Workspace").TelePads2
plrs.PlayerAdded:Connect(function(plr)
local block = game:GetService("Workspace"):FindFirstChild(plr.Name .. "'s Block")
for _, part in ipairs(tp1:GetChildren()) do
for _, part2 in ipairs(tp2:GetChildren()) do
local pos = part2.CFrame
part.Touched:Connect(function(touch)
if part.Num.Value == part2.Num.Value and touch.Parent == game:GetService("Workspace") then
print(pos)
block.CFrame = pos
end
end)
end
end
end)

“Ignore the HumTelePads, just the Telepads”