Im making a round script with FE and i'm fairly new to scripting. I thought I did everything right as it worked when I played solo but when I started a server it wouldn't work.
My remote event is located in Replicated Storage and so is my int val
Script this is located in ServerScriptService
local play = game.Players.LocalPlayer
local Int = game:GetService("ReplicatedStorage"):WaitForChild("Int")
game.ReplicatedStorage.Intermis.OnServerEvent:Connect(function(player, text, tim)
while true do
text.Text = "Intermission = "..Int.Value
Int.Value = Int.Value - 10
wait(1)
if Int.Value == 0 then
for _,player in pairs (game.Players:GetPlayers()) do
if player.Character then
player.Character:MoveTo(Vector3.new(game.Workspace.tele.Position))
text.Visible = false
if text.Visible == false then
for i = 6, 1, -1 do
tim.Visible = true
tim.Text = "Time Left = "..i
wait(1)
if i == 1 then
play.Character:MoveTo(Vector3.new(197.927, -48.632, -116.923))
Int.Value = 30
text.Visible = true
tim.Visible = false
end
end
end
end
end
end
end
end)
Local Script It is located in a ScreenGui which is located in StarterGui and so is both TextLabels (the time is also a TextLabel)
local inter = game:GetService("ReplicatedStorage")
inter:WaitForChild("Intermis"):FireServer(script.Parent.TextLabel, script.Parent.time)

2 comments
line one in the server script
Does not work