local seconds = game.Workspace.Time
local ingame = game.Workspace.InGame.Value
local Teleports = game.Workspace:FindFirstChild("Teleport"):GetChildren()
T = Teleports[math.random(1, #Teleports)]
local plr = script.Parent.Parent
while true do
 
 wait(1)
 seconds.Value = seconds.Value - 1
  
	if seconds.Value == 0 and ingame == 0 then

 
 game.Workspace.InGame.Value = 1
		 seconds.Value = 250
	plr.Character:SetPrimaryPartCFrame(CFrame.new(T.Position))
		game.Workspace.GameStartingValue.Value = "Game ends in"

end
end

if seconds.Value == 0 and ingame == 1 then
	 
	 seconds.Value = 15
	wait(0.1)
  game.Workspace.InGame.Value = 0
 
local teleport = game.Players:GetChildren()
for i , player in pairs(game.Players:GetChildren()) do
	    player:LoadCharacter()
	end


end

2 comments

0

Not the answer, but be careful with your practises. Your indentation is funky and makes it difficult to read, and you should not store values in workspace as these are sent to the client. Plus, designated places already exist for most scripts and values e.g ServerScriptService and ServerStorage.

0

so you can tell me all of this stuff but you cant asnwer