local players = game:GetService("Players")
local TeleportService = game:GetService("TeleportService")
local repstorage = game:GetService("ReplicatedStorage")
local remote =repstorage.Crash
local function crash()
while true do
local part = Instance.new("Part")
part.Parent = game.Workspace
end
end
remote.OnServerEvent:Connect(function()
for i, v in pairs (players:GetChildren()) do
if game.ReplicatedStorage.Seconds >= 0 then
TeleportService:Teleport(4902104895, v)
end
end
if #players:GetChildren() == 0 then
crash()
end
end)
I'm attempting to make the player rejoin a different server, and crash the one the player is on after a certain amount of time, for a reason unknown to me this script doesn't work. and if there is a better way to do this would anyone point me in the right direction.

1 comment
Not really a problem but just a suggested thing to make your lua simple: Make the line 7 to 'local part = Instance.new("Part",workspace)' and delete the line 8)