Does anyone know how to make an overlay button teleport you to a random teleporter?

I am trying to make an overlay button that teleports you to a random teleporter on the map. When I tried to make it teleport to a random teleporter in a group, it would only teleport to the first one I placed. How in the world could I do this? (If you need more info about what my problem is, feel free to ask) Pls Help.

Wire the overlay to an item granter
(When pressed, run wire pulse block.)
In the item granter, put a block in the wire pulse category.
Do this:
broadcast on channel (create text with (teleport,random integer from(how many teleporters you have))
This will broadcast a message teleport(random number)
For example, teleport1.
Pu these channels in the teleporters.

2 Likes

Couldn’t you just assign several different teleporters to the same group?

This is when a button is clicked. Not when you step on a teleporter

Yeah, but couldn’t you link the overlay to a teleporter? Then that teleporter would have no group teleporting to it, but it would teleport you to a teleporter.

Thank you so much for the reply! It worked!

1 Like

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.