Im making a game with an intermission timer set and it transitions into a Map voting to essentially loading the character in the game. I know I need to make a remote event for the timer/seconds but have no clue on how to do so. This is my Local Script which has a "while true do" statement (for the timer) within it that I know I need to move.
local seconds = game.ReplicatedStorage.Time
local Nextt = game.Workspace.Next
local Status = game.ReplicatedStorage.Status
while true do
wait(1)
seconds.Value = seconds.Value - 1
local Game = game.Workspace.Game.Position
if seconds.Value == 0 and Nextt.Value == 0 then --When Intermission is over
Nextt.Value = 1
seconds.Value = 15
Status.Value = "Map Voting - "
script.Parent.Parent.Parent.Intermission.TextLabel.Position = UDim2.new(0.511, 0,0.026, 0)
script.Parent.Parent.Parent.Intermission.TopBar.Visible = true
script.Parent.Parent.Parent.Vote.ImageButton.Visible = true
script.Parent.Parent.Parent.Vote.Forest.Visible = true
script.Parent.Parent.Parent.Vote.Votes.Visible = true
end
if seconds.Value == 0 and Nextt.Value == 1 then--When Map Vote is over
Nextt.Value = 2
seconds.Value = 3
Status.Value = "The Forest has been selected!"
script.Parent.Parent.Parent.Intermission.TextLabel.Visible = false
script.Parent.Parent.Parent.Vote.ImageButton.Visible = false
script.Parent.Parent.Parent.Vote.Forest.Visible = false
script.Parent.Parent.Parent.Vote.Votes.Visible = false
end
if seconds.Value == 0 and Nextt.Value == 2 then
Nextt.Value = 3
seconds.Value = 5
Status.Value = "Player has been selected to be the Seeker"
end
if seconds.Value == 0 and Nextt.Value == 3 then
Nextt.Value = 4
seconds.Value = 5
script.Parent.Parent.Parent.Intermission.TextLabel.Position = UDim2.new(0.511, 0,0.026, 0)
Status.Value = "Game starts in "
script.Parent.Parent.Parent.Intermission.TextLabel.Visible = true
end
end
Can someone explain this for me please? Thanks!

1 comment
A recommendation, don't use LocalScripts to change game values. It won't go across the server to other clients, use a ServerScript instead. If you need help on how RemoteEvents work, I posted an answer on someone's question explaining the basics on them. https://scriptinghelpers.org/questions/94651/can-someone-help-me-understand-remote-events-they-dont-work-for-me#87427