So I'm making a game, and I want to limit how many players can touch a block and teleport at a time. Here is the teleport script:
function onTouch(part) if part.Parent.Humanoid ~=nil then part.Parent:MoveTo(script.Parent.Parent.Tele2.Position) script.Parent.Parent.Tele2.Script.Disabled = true wait(0) script.Parent.Parent.Tele2.Script.Disabled = false end end script.Parent.Touched:connect(onTouch)
Is there anything I could add to it so only 2 people can teleport within 2 minutes or so? And maybe have an error message when a player tries to teleport when 2 people already teleported within the 2 minutes? Thanks!

3 comments
Please put your code in code blocks
if 2 "humanoid" touch = cooldown 120 second
Thanks, and sorry about not putting code into code blocks.