I am basically trying to make a 1v1 matching system that teleports the player when they step on a specific platform (should at least contain 2 players) and click a start button(It pops up when two or three players are on both platform) but cant seem to figure out how I should do this. Any Example?
just made this one the fly but i guess it would look something like this:
local player1 = "None" local player2 = "None" local Platfrom1 = "" --platoform location in workspace local Platfrom2 = "" --platoform location in workspace local Destenation1 = "" --Brick location in workspace local Destenation2 = "" --Brick location in workspace local timer = 30 --countdown in 30 seconds --Get player1 Platfrom1.Touched:Connect(function(hit) local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent) if player then player1 = player.Name end end) --Get player2 Platfrom2.Touched:Connect(function(hit) local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent) if player then player2 = player.Name end end) Platfrom2.TouchEnded:Connect(function(hit) local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent) if player then player2 = "None" end end) Platfrom1.TouchEnded:Connect(function(hit) local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent) if player then player1 = "None" end end) while wait(1) do timer = timer - 1 print(timer) if timer == 0 then if not player1 == "None" then if not player2 == "None" then if game:GetService("Players"):FindFirstChild(player1)then game:GetService("Players"):FindFirstChild(player1):WaitForChild("Character").HumanoidRoot.Cframe = Destenation1.CFrame end if game:GetService("Players"):FindFirstChild(player2)then game:GetService("Players"):FindFirstChild(player2):WaitForChild("Character").HumanoidRoot.Cframe = Destenation2.CFrame end end end timer = 30 end end