Log in to vote

Bad Argument #1 to 'remove'(table expected, got nil) Does anyone know how to fix this?[SOLVED]

Asked by 4 days ago
Edited 4 days ago

Dont worry about it, I figured out I put a period there instead of a comma XD

The script teleports players and as it is teleporting them it removes the spawn they landed on so people dont teleport on top of them or so no 2 people land on the same spawn. But I get an error?

Does anyone know how to fix it. Here the code :)

    local spawns = chosemap:WaitForChild("Spawns"):GetChildren()
    for _, player in pairs(game.Players:GetPlayers()) do 
        if player and #spawns > 0 then
            local uppertorso = player.Character:WaitForChild("UpperTorso")
            local allspawns = math.random(1, #spawns)
            local randomspawns = spawns[allspawns]
            if randomspawns and uppertorso then
                uppertorso.CFrame = +, 3, 0))

Thank you for your time


Looks like you're using an ad blocker.

That's fine...

No, it really is.

Just, I mean, we put a lot of work into this site, you know?

It would be really really appreciated if you would turn off your ad blocker for our website...

We tried really hard to make our ads as unobtrusive as possible.

If you really hate ads, would you consider a $2 donation via Patreon?

Here's the link.

We love you. We hope you love us too.




Now back to your regularly scheduled Scripting Helpers....




Answer this question