Error Code 277 Kicking All Players Out of My Game

Hello, the game I have been developping for months has been working fine up until yesterday, when I was testing my game with one of my friends, when suddenly we both got kicked out at the exact same time, with the error code 277. I played other games and I didn’t get disconnected, so it must be my game. I have around 18k parts in my game, is it possible that too many parts could crash roblox, or what could be the problem, and how could I fix it? Thank you.

5 Likes

It could be you have a virus(either model or plugin) or it could also be the fact your server can’t handle all the parts.

Did you get any error message with the error code?

Edit: It’s an Internet or server (game) problem. If you have too many parts loaded at one time or too many players in a server then it may crash some players with low/slow Internet.

Error 277 usually means a connection issue but because it’s kicking all players at the same time, it is likely related to your game (also because this error doesn’t occur for you on other games like you said).

Because of this, your issue may be related to the amount of parts you have. You may want to create a system that loads parts when nearby and unloads them when far away or out of player sight. Alternatively, a simple solution may be to reduce the amount of parts you have in your game.

Hi, I checked all models that I have for viruses, and I also have some antiviruses. For the plugins, I made a new baseplate with the same plugins and i didn’t get kicked out.

1 Like

I forgot to take a picture of the error, but it looks like this.
image

Hello, I thought of a system where the game is subdivided into different places (roblox places) and then he could teleport to another place when he gets to another level, would that help?

1 Like

Roblox Error code 277 is a connection error that can be caused by the server getting disconnected when you’re playing. The Roblox will stop letting you play because it’s trying to reconnect with the game and failing every time.

found this on a website

1 Like

Same problem here. My game used to never have any problems loading a model or map. Now it’s insanely game breaking and difficult to solve.

Try using StreamingEnabled if your parts are distributed across the map (and not all on one place).

StreamingEnabled can have huge impact on large maps, so feel free to try it out.

2 Likes

That would work. It may be a little tedious to make but I think it should lower lag.

But based off of what your saying, I’m guessing you have all levels shown at the same time in your game? If so, you could make it unload when nobody is playing that level and load when somebody is joining that level. To make it, I would say make all the parts hide or no visible or place it into another place in your game (maybe ReplicatedStorage), this would make it so the game doesn’t have to render that in to other clients and only needs to when a player is playing. If you’re going to hide or make the parts disappear, you may want to make any scripts in those parts stop running too by making it temporarily disabled and enabled whenever a player is playing that level.

In short, based off of what you said by levels, I’m guessing you have all levels running and loaded even when nobody is in that/those level(s).

You could:
•Make the level disappear and stop all scripts running in that level until somebody is playing this level.
•Alternatively (recommended), make the level’s parent somewhere else (I would do ReplicatedStorage).

I would recommend the second option, it’s a bit easier however I believe you will need to use a server script, especially if you want to put it in ReplicatedStorage. This would also keep the player in one game without having to teleport to many places in your game for a different level. However, if this doesn’t work out for you, you may just want to do the idea you said.

I tried using streaming enabled but it didn’t do anything, I still got kicked out.

Right now, I deleted about 8k parts that are pretty useless in my game, I will keep you updated.

1 Like

It is not normal nor natural to receive this error, regardless of the amount of parts. I would recommend you to file a bug report by messaging the Bug Reports group.

Ok, I will try, but is it possible that a virus could do this? I didn’t think of it at first, because the error message was saying disconnected, but is it possible? Thanks.

The error came up when Roblox shutdown vulnerabilities existed, however those have been patched. I am currently not aware if a new shutdown vulnerability started to appear, and to my knowledge, scripts can’t execute this error too.

I’m not really sure, never experienced it. Try using some script detector to scan them if you would like to be sure of a virus-free environment.

1 Like

Hi, i think I have isolated the problem, I have no idea why, but it seems that something is wrong with this script

parts = script.Parent:GetChildren()

while true do
	for _, child in ipairs(parts) do
		if child.Name ~= "Script" and child.Name ~= "MeshPart" then
			child.Touched:Connect(function(hit)
				local partParent = hit.Parent
				local humanoid = partParent:FindFirstChild("Humanoid")
				if humanoid then 
					humanoid.Health = 0
				end
			end)
		end


	end
	wait()
end

What could be the problem with it? I made this script, when I delete the script from my game, i don’t get disconnected anymore.

That’s a very inefficient script and you’re making a memory leak there.

What you basically did, is to bind a Touched event to a function every loop, causing thousands of events to be bound after a few minutes.

What exactly do you want to achieve with that script? Eventually I can write you a more efficient one.

1 Like

oh, I just want to check if any parts of the model have been touched, and if so, then they should get killed.

Then a loop is unnecessary, as you’re binding the Touched event already.

parts = script.Parent:GetChildren()

	for _, child in ipairs(parts) do
		if child.Name ~= "Script" and child.Name ~= "MeshPart" then
			child.Touched:Connect(function(hit)
				local partParent = hit.Parent
				local humanoid = partParent:FindFirstChild("Humanoid")
				if humanoid then 
					humanoid.Health = 0
				end
			end)
		end
	end

(Edited on mobile, so you have to do the formatting yourself :see_no_evil:)

1 Like