Hello, does anyone know of a way to get the server frame rate using a script?
The server does not have a frame rate, are you referring to ping / latency or an engine runtime event?
I believe something like this should suffice:
local Count = 0
local lastTime = os.time()
game:GetService('RunService').Heartbeat:Connect(function()
if lastTime ~= os.time() then
lastTime = os.time()
print(Count)
Count = 0
else
Count += 1
end
end)
actually, server does have its own fps, how else can RunService.Heartbeat / Stepped work on the server? normally it’s at 60 fps if server isn’t lagging, unable to be changed by fps unlocker since fps unlock can only change the client’s fps
Use the Heartbeat event.
local fps = 1 / RunService.Heartbeat:Wait()
Alternatively you could use the deltaTime argument.
RunService.Heartbeat:Connect(function(dt)
local fps = 1 / dt
end)
Okay, so let me ask you: how does a server render the frames per second? Do Roblox servers have a screen or monitor, just like a personal computer? If Roblox servers run events like RunService.Heartbeat, what exactly do you think they are using to calculate the server’s frames per second?
Servers don’t have a screen or monitor
but i’m sure there are some things that the server does every frame, no?
Servers usually do not calculate frames per second in the way that you’re referring to, which I’m assuming that it’s involving the frames per second on the screen. Servers use processing power to simulate tasks being performed per tick on the game, this is universal to any game engine or computer application in that matter.
Citation source:
That is why games like Counter Strike or Valorant have players asking for better tick rate servers; it allows them to render movements more quickly.