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

A player must teleport to a random map but instead teleports to center of baseplate?? Help?

Asked by 6 years ago

So, I tried making a teleport script that teleports the player to a brick in a folder but, instead it teleports the player to the center of the baseplate????!?!?

here is the script:

local Maps = workspace.TeleportArena:GetChildren()
local ChosenMap = Maps[math.random(1,#Maps)];
target = CFrame.new(Vector3.new(Maps.Position))
for i, player in ipairs(game.Players:GetChildren()) do
   if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
      player.Character.HumanoidRootPart.CFrame = target + Vector3.new(0, i * 5, 0)
   end
end         

Teleport arena is the folder where the bricks to teleport to are placed

0
"Vector3.new(Maps.Position)" creeperhunter76 554 — 6y

Answer this question