Extreme delay in game that does not appear in Roblox Studio

Hello everybody. I’ve encountered a big issue while developing on my game.
Let me add more context so that the issue can fully be understood.

I just started working on a game that allows the player to gain abilities when they complete certain quests. Everything was just fine until this issue just showed up out of nowhere. When I play the game (in Roblox not in the Roblox Studio), the ping is extremely high and everything is just delayed. You might say that the issue is because of how large the game is, but actually it’s not even large, it only contains like 1-10 scripts/modules that are neatly organised in folders.

And the funny thing is, the game does not lag and I don’t experience any delays when I test it in Roblox Studio, the ping is about 50 or less, but when you play it on Roblox, the ping is about 400 or higher. I never used any free models or anything from the toolbox.

Any kind of help would be appreciated.

if you haven’t tested it out is the ping also higher for other games?

Nope, the ping is usually about 100 or less in big games such as Shindo Life, Blox Fruits, etc. But my game is the only game that I exprience high ping.

When you’re playing in Studio, your computer runs both the server and client in tandem. The reason the latency is low is because the information isn’t actually being sent over the Internet.

Once you upload your game to ROBLOX, you have to play on their servers, which tend to in general have pretty high latency. You can reduce this by reducing your network traffic–fire remotes less often, have clients render their own effects, etc. The physics simulation will result in a lot of latency, as well, so simplifying assemblies wherever possible will help a lot.

1 Like

Are there any other solutions to this issue? I might have to abandon this game if this problem continues.

If you’re building a single-player experience and aren’t concerned with people cheating, you can run everything on the client, but, in general, a lot of designing on ROBLOX revolves around hiding latency. Letting clients control as much as you can safely get away with goes a long way.

Sadly this game is a multiplayer game where players fight and grind together.

server regions can also be a part of an issue since even if you create a empty server which is joining a game with only full servers or no servers the region isn’t the same as yours which 50% happens to me most of the time

it’s usually 215-300 ping for me since my ping is only mostly good on singapore and i can barely get good ping in any games with only a hundred servers since the servers aren’t probably asian and since roblox’s players are usually americans, the servers get real laggy prior to me cause the capacity can’t hold up which my ping is only better at like night cause most people with a normal schedule sleep at that time which means 1/3 of the playing is reduced

1 Like

btw have you tried asking your friends to play the game just in case it’s you with the ping issue

Yeah maybe I’ll try doing that right now.

Hey uh, I tested the game with 3 of my friends and the ping was still high, some moves were still delayed and the ping was like 250ms. There was this one error that popped up in my developer console though.

Does this have to do with the ping issue?

This is the shadow clone script

--// Shadow Clone \\--
game:GetService("ReplicatedStorage").Remotes.Visual.ShadowClone.OnServerEvent:Connect(function(player)
	local character = player.Character
	local headc = character.Head
	local torsoc = character.Torso
	local rightarmc = character["Right Arm"]
	local leftarmc = character["Left Arm"]
	local rightlegc = character["Right Leg"]
	local leftlegc = character["Left Leg"]
	local meclone = game:GetService("ReplicatedStorage").Main.Abilities.Broly.BrolyBox["ShadowJutsu"]:Clone()
	meclone.Head.Color = headc.Color
	meclone.Torso.Color = torsoc.Color
	meclone["Right Arm"].Color = rightarmc.Color
	meclone["Left Arm"].Color = leftarmc.Color
	meclone["Right Leg"].Color = rightlegc.Color
	meclone["Left Leg"].Color = leftlegc.Color
meclone.Parent = workspace.FXFolder
meclone.Name = "Brocolli Clone"
--positioning

for _,par in pairs(meclone:GetDescendants()) do
	if par:IsA("BasePart") and player.Character:FindFirstChild(par.Name) then
		par.CFrame = player.Character:FindFirstChild(par.Name).CFrame
		par.CollisionGroupId = 1
		delay(.025, function()
			local ts = game:GetService("TweenService")
			ts:Create(par, TweenInfo.new(1), {Transparency = 1, Color = Color3.fromRGB(0, 255, 0)}):Play()
		end)
	elseif par.Name == "Handle" then
		local ts = game:GetService("TweenService")
		par.CollisionGroupId = 1
		ts:Create(par, TweenInfo.new(1), {Transparency = 1}):Play()
	  end
	end
	delay(.15, function()
		game:GetService("Debris"):AddItem(meclone, 1)						
	end)
end)

Because your using pairs, not ipairs so use ipairs bc it’s faster than pairs

--// Shadow Clone \\--
game:GetService("ReplicatedStorage").Remotes.Visual.ShadowClone.OnServerEvent:Connect(function(player)
	local character = player.Character
	local headc = character.Head
	local torsoc = character.Torso
	local rightarmc = character["Right Arm"]
	local leftarmc = character["Left Arm"]
	local rightlegc = character["Right Leg"]
	local leftlegc = character["Left Leg"]
	local meclone = game:GetService("ReplicatedStorage").Main.Abilities.Broly.BrolyBox["ShadowJutsu"]:Clone()
	meclone.Head.Color = headc.Color
	meclone.Torso.Color = torsoc.Color
	meclone["Right Arm"].Color = rightarmc.Color
	meclone["Left Arm"].Color = leftarmc.Color
	meclone["Right Leg"].Color = rightlegc.Color
	meclone["Left Leg"].Color = leftlegc.Color
meclone.Parent = workspace.FXFolder
meclone.Name = "Brocolli Clone"
--positioning

for _,par in ipairs(meclone:GetDescendants()) do
	if par:IsA("BasePart") and player.Character:FindFirstChild(par.Name) then
		par.CFrame = player.Character:FindFirstChild(par.Name).CFrame
		par.CollisionGroupId = 1
		delay(.025, function()
			local ts = game:GetService("TweenService")
			ts:Create(par, TweenInfo.new(1), {Transparency = 1, Color = Color3.fromRGB(0, 255, 0)}):Play()
		end)
	elseif par.Name == "Handle" then
		local ts = game:GetService("TweenService")
		par.CollisionGroupId = 1
		ts:Create(par, TweenInfo.new(1), {Transparency = 1}):Play()
	  end
	end
	delay(.15, function()
		game:GetService("Debris"):AddItem(meclone, 1)						
	end)
end)