Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Issue with teleportation script?

Asked by 9 years ago
    spawns = gameChosenClone.Spawns
        for i,v in pairs(game.Players:GetPlayers()) do
            name = v.Name
            check = workspace:FindFirstChild(name)
            if check then
                checkHumanoid = check:FindFirstChild("Humanoid") 
                if checkHumanoid then
            check:MoveTo(spawns[i].Position)

The error reads line 25, 1 is not a valid member of model. I understand whats wrong, but how should I fix it? Would this work?

    spawns = gameChosenClone.Spawns
        for i,v in pairs(game.Players:GetPlayers()) do
            name = v.Name
            check = workspace:FindFirstChild(name)
            if check then
                checkHumanoid = check:FindFirstChild("Humanoid") 
                if checkHumanoid then
        game.Players:MoveTo(spawns[i].Position)
0
Line 8 in these is line 25. WolfgangVonPrinz 0 — 9y

1 answer

Log in to vote
0
Answered by
Zyleak 70
9 years ago

To teleport, you need to change the players torso position.

Ad

Answer this question