Problem with Round System

So i made a round system but i have a feature in game that allows players to fix generators and reduce the round time by 45 Seconds but the thing is i would have to communicate to the server and that is killing me as i am intermediate at this can someone tell me how to fix this!

SERVER SCRIPT

local ROUND_TIME = 200
local INTERMISSION = 3
local KillerChooseTime = 3
local KillerSpawnTime = 7
local DoorCloseTime = 10

local inRound = game:GetService(“ReplicatedStorage”).InRound
local Staus = game:GetService(“ReplicatedStorage”).Status

local KillerTeam = game.Teams.Killer
local Survivor = game.Teams.Survivor
local Lobby = game.Teams.Lobby
local KillerSpawn = workspace.KillerSpawn
local FixGenerator = game.ReplicatedStorage.FixGenerator

local Gates = workspace.Gates

FixGenerator.OnServerEvent:Connect(function(player,Generator1,ColorChange)

ROUND_TIME -= 100
Generator1.Lights1.BrickColor = ColorChange
Generator1.Lights2.BrickColor = ColorChange
print(ROUND_TIME)

end)

inRound.Changed:Connect(function()

if inRound.Value == true then

  for i, plr in pairs(game.Players:GetChildren()) do
  	
  	local Char = plr.Character or plr.CharacterAdded:Wait()
  	local HumRP = Char:WaitForChild("HumanoidRootPart")
  	
  	if plr.Team == Lobby then
  		HumRP.CFrame = workspace.MapSpawn.CFrame
  		plr.Team = Survivor
  		
  	elseif plr.Team == KillerTeam then
  		return
  	end

  	
  	Char:WaitForChild("Humanoid").Died:Connect(function()
  		plr.Team = Lobby
  		
  		
  	end)
  end

else

  for i, plr in pairs(game.Players:GetChildren()) do
  	local char = plr.Character
  	local HumRP = char:WaitForChild("HumanoidRootPart")
  	
  	HumRP.CFrame = game.Workspace.LobbySpawn.CFrame
  	plr.Team = Lobby
  end

end
end)

local function Round()
while true do

  inRound.Value = false
  
  for i = INTERMISSION, 0, -1 do
  	
  	Staus.Value = "Round Begins in "..i
  	wait(1)
  end
  
  for i = KillerChooseTime, 0, -1 do
  	
  	Staus.Value = "Choosing Killer!"
  	wait(1)
  end
  
  local Player = game.Players:GetPlayers()
  for i = 1, #Player do
  	local ChosenPlayer = Player[math.random(i)]
  	local Killers = {}
  	ChosenPlayer.Team = KillerTeam

  	for i, plr in pairs(game.Players:GetChildren()) do

  		if plr.Team.Name == "Killer" then


  			table.insert(Killers, ChosenPlayer.Name)
  		end	
  	end
  	wait(1)
  end
  
  inRound.Value = true
  
  for i = KillerSpawnTime, 0, -1 do
  	
  	Staus.Value = "Killer Will Spawn in "..i
  	wait(1)
  end
  Staus.Value = "Killer has Spawned"
  
  for i,v in pairs(game.Teams.Killer:GetPlayers()) do
  	v.Character.HumanoidRootPart.CFrame = KillerSpawn.CFrame
  	local Glow = Instance.new("PointLight")
  	Glow.Color = Color3.new(1, 0, 0.0156863)
  	Glow.Brightness = 40
  	Glow.Enabled = true
  	Glow.Parent = v.Character.HumanoidRootPart
  end

  for i = ROUND_TIME, 0, -1 do
  	Staus.Value = "Doors Will Open in "..i
  	wait(1)
  end
  
  
  Staus.Value = "Gates are Open!"
  
  local OpenedGates = game:GetService("ServerStorage").OpenedGates
  local Gate1 = OpenedGates.Gate1:Clone()
  local Gate2 = OpenedGates.Gate2:Clone()
  
  for i,v in pairs(Gates:GetChildren()) do
  	v:Destroy()
  end
  
  Gate1.Parent = workspace
  Gate2.Parent = workspace
  
  
  wait(2)
  for i = DoorCloseTime,0,-1 do
  	
  	Staus.Value = "Doors Close in "..i
  	wait(1)			
  end
  Staus.Value = "Doors CLOSED"
  wait(3)

end
Staus.Value = “Round Ended”
end

spawn(Round)

LOCAL SCRIPT

local Player = game.Players.LocalPlayer

local Char = script.Parent

local Animations = script.Parent.Animations

local Prompt = workspace.Generator.PromptPart.ProximityPrompt

local Generator1 = workspace.Generator

local FixGenerator = game.ReplicatedStorage.FixGenerator

local humanoid = Char:WaitForChild(“Humanoid”)

local Animation = humanoid:LoadAnimation(Animations.GeneratorAnimation)

local ColorChange = BrickColor.new(“Lime green”)

Prompt.PromptButtonHoldBegan:Connect(function()

Animation:Play()

Animation.Looped = true

end)

Prompt.Triggered:Connect(function()

Animation:Stop()

FixGenerator:FireServer(Generator1,ColorChange)

end)

Firstly, to format your code properly, please put “```” before and after your code.

Secondly, the only information which should be sent to the server is which generator it happened on. By allowing the client to set the color you are more or less inviting exploiters to change the color freely.

Preferably you should send an event to the server once the trigger is pressed initially. The client should then carry on as usual, but the server should keep an eye on the client to see if they stay within range and make sure the time it took for them to complete the event is appropriate. Otherwise exploiters may send an event stating they are done for each generator in the game instantly.

If you have a variable containing the time left, then you should decrease it by 45 whenever a generator is completed.