Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to make a teleporter that can teleport to two places?

I want to be able to make a teleporter with a random chance to go to one place and a random chance to go to another (not another place as in game but as an area)

1 comment

0

i might be able to make 1 where it teleports you, but not randomly to two..

1 answer

✓ Accepted answer

you should not request for someone to make a script for you but ill make it anyway put this inside the teleport part

local part = script.Parent
part.Touched:Connect(function(hit)
	local random = math.random(1,2) -- you can change the max number depend on how many you want to random the tp

	if hit.Parent:FindFirstChild("Humanoid") ~= nil then
		if random == 1 then
			hit.Parent.HumanoidRootPart.Position = workspace.TP12.Position -- change it if you want

		elseif random == 2 then
			hit.Parent.HumanoidRootPart.Position = workspace.TP22.Position -- change it if you want

		end
	end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.