RemoteEvent error?

-- This is LocalScript
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage:WaitForChild("RemoteEventTest")
local function onTimerUpdate(seconds)
	for i = seconds, 0, -1 do
		if i % 60 <= 9 then
			script.Parent.Text = math.floor(i/60)..":0"..(i%60)
		else
			script.Parent.Text = math.floor(i/60)..":"..(i%60)
		end
		script.Parent.Text = i
	end
end
remoteEvent.OnClientEvent:Connect(onTimerUpdate)

-- This is normal Script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage:WaitForChild("RemoteEventTest")
remoteEvent:FireAllClients(game.Workspace.Maps[lastmap].Time.Value)

-- warn message
17:23:05.808 - Infinite yield possible on 'ReplicatedStorage:WaitForChild("RemoteEvent")' (x2)
17:23:05.809 - Stack Begin
17:23:05.809 - Script 'Players.Rurvker.PlayerGui.ScreenGui.TextLabel.LocalScript', Line 4
17:23:05.809 - Stack End

What’s wrong in this code?

1 Like

It means it doesn’t exist, try actually giving a path that exists

1 Like

Okey. I solved that problem. Thanks to help!

2 Likes