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

Script not teleporting player to the map anyone know why?

Asked by 4 years ago
Edited by youtubemasterWOW 4 years ago

Okay so it works with the one player (the piggy) teleporting to the waiting area but the player doesnt go anywhere and i retyped the code 3 different times. here is the line of code that im talking about:

function module.TeleportPlayers(players, mapspawns)
    for i, player in pairs(players) do
        local character = player.Character

        if character:FindFirstChild("HumanoidRootPart") then

            player.Character.Humanoid.WalkSpeed = 16

            local rand = Random.new()
            player.Character.HumanoidRootPart.CFrame = mapspawns[rand.NextInteger(1,#mapspawns)].CFrame + Vector3.new(0,10,0)
        end
    end
end

return module

Please let me know if you know how to fix this.

0
Any errors? youtubemasterWOW 2741 — 4y
0
16:49:20.966 - Image " " failed to load in "Workspace.Map.Floor0.LivingRoom2.Image.Picture.Decal.Texture": Unexpected URL RealJustFoxin 2 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Thats the only error i get

Ad

Answer this question