Hi today i made a battle royale game on roblox but when i try doing the matchmaking script it keeps erroring with "Argument 3 or missing nil" heres the script its erroring at line 18.
01 | while true do |
02 | local Teleporters = { } |
03 | local IsInTable = false |
04 | local TS = game:GetService( "TeleportService" ) |
05 |
06 | local code = TS:ReserveServer( 5970897194 ) |
07 |
08 | script.Parent.Touched:Connect( function (t) |
09 | if t.Parent:FindFirstChild( "Humanoid" ) then |
10 | if IsInTable = = true then return end |
11 | table.insert(Teleporters,game.Players:FindFirstChild(t.Parent.Name)) |
12 | IsInTable = true |
13 | for i = 10 , 0 ,- 1 do |
14 | script.Parent.BillboardGui.TextLabel.Text = i |
15 | wait( 1 ) |
Argument 3 is the game.Players:FindFirstChild(v)
and this would not work because you have already done that in line 11, where you insert the player that you already found into the table.
So no need to do that.
01 | while true do |
02 | local Teleporters = { } |
03 | local IsInTable = false |
04 | local TS = game:GetService( "TeleportService" ) |
05 |
06 | local code = TS:ReserveServer( 5970897194 ) |
07 |
08 | script.Parent.Touched:Connect( function (t) |
09 | if t.Parent:FindFirstChild( "Humanoid" ) then |
10 | if IsInTable = = true then return end |
11 | table.insert(Teleporters,game.Players:FindFirstChild(t.Parent.Name)) |
12 | IsInTable = true |
13 | for i = 10 , 0 ,- 1 do |
14 | script.Parent.BillboardGui.TextLabel.Text = i |
15 | wait( 1 ) |
Hi, your issue is the defining factor, you have to define it!