Cant join after server restart

Ok, so my server has had a lot of players joining recently and a lot of restarts are needed to clear entities. Pretty much everytime i restart it, people cant join. it just loads them to 99% then unlimited load screen. If i restart the server a few more times it eventually works. this has become a huge problem. Worst part is. we have no idea what causes it.

Same here, newly created Server now needs to be restarted twice or people get stuck on the last two steps on the loadingscreen. Currently no cause found.

1 Like

@Benji_d and @Hazy this Error appears when some people connect too early while the server resources aren’t completely loaded yet. There are some resources out there on #development:releases to solve this problem.

1 Like

What would we search for? or link one if possible please.

1 Like

Follow these steps and everything should work like you want it. If not then reply again. I will upload my version to stop connecting while your server is loading.
@Hazy

Where would i put the

Code

local connectionEvent = AddEventHandler(‘playerConnecting’, function(a, setReason)
setReason(‘The server is still starting up, please wait and try again in a little while.’)
CancelEvent()
end)

RegisterCommand(‘initkick_done’, function()
SetTimeout(100, function() – 100ms wait so that any resources that do something on tick can run
if connectionEvent then
RemoveEventHandler(connectionEvent)
connectionEvent = nil
end
end)
end, true)

Do i put it into a client or server.lua?

1 Like

Put it in a server.lua

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.