Ping spikes absurdly high when playing my own game

As the title suggests, my ping starts normal, but after a few seconds, it gets to more than 10000ms.

It also doesn’t happen on my other games or any other game, so I believe the issue lies in my game.

I also see this on the server logs on the console:


Note: My friend’s username didn’t appear here, only mine.

I also asked a friend their ping when they join, but it seems normal.

What could cause this?

1 Like

Is it inside the game or studio session?
If its inside the game you could have a virus free model or someone from team create is sabotaging you.
It seems like it forces your client to send remove events perhabs?

Answer 1: It happens in an in-game session. In studio, 50 ping is maintained
Answer 2: The game doesn’t have a lot of free models and I have searched for a lot of keywords in viruses. Also, I’m currently working on it solo.
Answer 3: probably? though, there might be an issue here:

local userInputService = game:GetService("UserInputService")
local runService = game:GetService("RunService")
local contextActionService = game:GetService("ContextActionService")

local keybinds = script.Keybinds
local reader = require(script.Reader)

local players = game:GetService("Players")
local player = players.LocalPlayer

local currentInputs: {[InputObject]: boolean} = {}

userInputService.InputBegan:Connect(function(i, e)
	if not e then
		currentInputs[i] = reader(nil, false, i)
	end
end)

runService.RenderStepped:Connect(function()
	local keys = userInputService:GetKeysPressed()
	local mouse = userInputService:GetMouseButtonsPressed()
	for i, v in pairs(currentInputs) do
		if v then
			local keysFind = table.find(keys, i)
			local mouseFind = table.find(mouse, i)
			
			if not (keysFind or mouseFind) then
				currentInputs[i] = nil
				reader(nil, true, i) -- the 2nd parameter is true, indicating that only very specific mechanics are used, and fired to the server
			end
		end
	end
end)

Press ctrl+shift+f and search for :IsStudio() or require()

Thats exactly what I did.

IsStudio() is only used by specific scripts (especially for the timer) for testing.
there are a lot of results for require, but i look at each one of the results and found nothing malicious.

Have you found weird hexademical number? like 0xdeadbeef (yes its an actual hexademical number lmao) or 0x4214 smth or \x52 and such?
Search up for “\” and “0x”

No results too, except for \n in topbarplus

1 Like

search up for stuff related to remot event firing
Like :FireServer/:FireClient it could be that admin related stuff being sent to you constantly hence detecting that you are an admin/owner of the game

By the way, my input system uses RemoteFunctions; do you think they could contribute to that log spam?

Unlikely as since it only getting triggered for you and its almost physically impossible for you to cause so much lags with it.

Also, I have seen only one use of RemoteEvents, being the black fade-in and fade-out transition, and only :FireAllClients() is used, which makes me even more confused.

Try running this in colsole to see all potentially hidden scripts:

local scripts:{LuaSourceContainer} = {} for i,v in game:GetDescendants() do if v:IsA("LuaSourceContainer") and not v:IsDescendantOf(game.CoreGui) then table.insert(scripts,v) end end print(scripts)

Both fortunately and unfortunately, still nothing malicious (both building and playtesting)

I will be trying to join using a different account. I’ll update you.

1 Like

this runs on any input, whether it’s mouse, comma, dot, enter, space, and so on

why is this in a RenderStepped?? can’t you just put it in a function and call it everytime the player makes an input??

1 Like

oh. i wrote that thinking it would be a better alternative for inputended, as it was quite inconsistent when using it

I used the “Disable Scripts” feature and found what was the cause. Apparently, there were 3 LocalScripts binded to RenderStepped and using InvokeServer to get cooldowns. I’m simply going to work around this using ReplicatedStorage, or using less precise loops.

1 Like

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