Remote event randomly stoped firing?

I have a loading screen script in replicatedifirst and when the game is done loading, so after the loading screen goes away, the remote doesnt fire to the server to let the server know the player is fully loaded

loading screen script (the bottom of it)

local Loaded = repStorage:WaitForChild('Remotes'):WaitForChild('Loaded')

loadingText.Text = 'Loading completed!'
task.wait(1)

Loaded:FireServer()

print('fired remoite')

loading_UI.Enabled = false

it prints fired remoite but the remote never gets fired

server script

local Loaded = repStorage:WaitForChild('Remotes'):WaitForChild('Loaded')

Loaded.OnServerEvent:Connect(function(player)
    print('running')
    player.PlayerData.Character.IsLoaded.Value = true
    if not table.find(playerList, player) then
        table.insert(playerList, player)
    end
end)

and it never prints running, which means the remote event didnt fire

any thoughts on why this aint working?

1 Like

can you send a photo of where are the scripts ?

ya,

the GameLoop script is the server script
Screenshot (730)

and heres the local script
Screenshot (732)

put print(Loaded) after the Loaded variable.

ok i did and it prints loaded, but some reason when having the print all the way down in the script, it doesnt print nothing, not sure if that has to do with anything

omgg ok so someone made me realize a mistake I did

it has to do with running a loop and no code under it is going to run

and I called the loop before the OnserverEvent, so thats why the remote wasnt getting fired to the server

and I did this cause i wanted to orginize my code but didnt realize that its gonna not make any code under it run

use couroutine, mark as solution if helped, have a good day.