I want this script to Teleport all players to a part ('Spawner') which is located in Workspace, but this script goes by x,y,z CFrame, and i want this ('Spawner') CFrame, example of what i want is like,
local LPlr = game.Players.LocalPlayer
Lplr.Character.HumanoidRootPart.CFrame = game.Workspace.Spawner.CFrame
But, instead of my player i want to make this script to teleport everyone there, instead of (0,50,0) I want the ('Spawner') CFrame.
function teleAll(x, y, z)
local pos = Vector3.new(x, y, z)
for _, plr in pairs(game:GetService("Players"):GetPlayers()) do
if plr.Character then
plr.Character:MoveTo(pos)
teleAll(0, 50, 0)
Note: The script does work.
A simple way of saying this is, I want all players teleported to a brick called Spawner in workspace.

1 comment
i will try this out right now