Is it possible to make a teleporter that teleports you to one block or another randomly? I tried but it isn't working. I am also trying to make it click-activated. This is my (normal) script inside the teleporter
function Click(Player, teleport)
if Player.Parent:FindFirstChild("HumanoidRootPart") then
local human = Player.Parent.HumanoidRootPart
teleport = math.random(1,2)
if teleport == 1 then
human.Position = Vector3.new(-875.194, -71.321, -1068.287)
end -- Destination A
if teleport == 2 then
human.Position = Vector3.new(-875.194, -71.321, -931.699)
end -- Destination B
end
end
script.Parent.ClickDetector.MouseClick:Connect(Click)

4 comments
well, because the humanoid Root part is the in character, not in the players service nor the player object
MouseClick only gives you one argument - Click has two. Get rid of the "teleport" argument in Click.
also, you could have a corresponding array of locations that can be indexed , this would excessive use of if statements
Could you please accept my answer if it worked?