Can anyone help me create an automatic teleport script? Example; 5 minutes pass - random player - transported to CFrame (-154) Sorry if the example is not explicit. The script literally chooses a random player within 7 minutes and that player is transported Imagine
local Players = game:GetService("Players")
local PlaceXYZ = Vector3.new(1, 0, 10)
function teleportRandomPlayer()
local plrs = Players:GetChildren()
local n = math.random(1, #plrs)
for i, v in pairs(plrs) do
if i == n then
if workspace:FindFirstChild(v.Name) then
if workspace[v.Name]:FindFirstChild("HumanoidRootPart") then
workspace[v.Name].HumanoidRootPart.Position = PlaceXYZ
end
end
break
end
end
end
spawn(function()
while wait(1000) do
teleportRandomPlayer()
end
end)
I tried this script and it didn't work

3 comments
Could you explain more?
sure the server automatically chooses a player and within 7 minutes the player is automatically teleports to a location
Yes, I had this problem too. Basically, the baseplate moves instead of you.