-
What do you want to achieve? Choosing a random player to teleport to specific Position.
-
What is the issue?
-
What solutions have you tried so far? Tried to search up on the internet but couldn’t find a related topic.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local Players = game:GetService("Players")
local IntermissionTime = 10
local RoundTime = 10
local MinPlayers = 1
local function tpPlayers()
local players = Players:GetPlayers()
local pickedPlayer = Players[math.random(#Players)]
for i, player in players do
if player == pickedPlayer then
player.Character.HumanoidRootPart.CFrame = game.Workspace.AttackerPos.CFrame
else
player.Character.HumanoidRootPart.Position = Vector3.new(math.random(-14, 14), 166.5, math.random(120, 148))
end
end
end
(This is not the whole script only the part where it teleport the players).
Thank you for your time!