How to make a FPS Counter

Glad that I could help! Have a amazing day. :happy3:

1 Like

Glad I could help with your game. :happy3:

I’m sorry if anyone had a problem or concern with this. I just tried to help some people that needed a quick minute Fps Counter. I know this isn’t the best and I’ll sure make it better next time. :happy1:

2 Likes

Still I wanna see AN EXAMPLE of a module using this.

1 Like

Your FPS Counter is not that accurate. You could easily make it more accurate by using task.wait(1) instead. I will come back with a better solution a little bit later when I have access to Studio.

1 Like

Or you know, using actually reliable methods of counting fps?
There’s tons of posts that describe those more reliable methods. There’s even a official way of seeing your in-game fps that don’t rely on less reliable methods.
Also, wait() isn’t as evil as all of those ““top devs”” say.

2 Likes

Thank You, This Really Helps Me! THANK YOU!

1 Like

I’m confused…
why over-complicate this instead of just using

https://developer.roblox.com/en-us/api-reference/function/Workspace/GetRealPhysicsFPS

1 Like

Because it’s not the actual framerate. It’s instead the framerate for the physics solver (which is very inaccurate, and hence the word “physics” in the function name.)

4 Likes

No problem. Have a good day. :happy1:

I’ll make a improved Fps Counter using that resource. Thankyou.

Theres actually a better way to do this. Thats way simpler. And more accurate:

local FPSGui = script.Parent
while wait() do
	FPSGui.Text = "FPS: " ..   math.floor(workspace:GetRealPhysicsFPS()) -- gets the fps, and removes the decimals.
	
end
2 Likes

That function returns the speed of which the physics system is running at, this is not what is being outputted and processed by the gpu
the api reference summarises this function as

Returns the number of frames per second that physics is currently being simulated at.

4 Likes

Its for physics not graphical FPS.

2 Likes

This may help a lot of smal devs! :smiley:

1 Like

Don’t use wait, use task.wait.

Wow thanks so much bro! I’ll defo use this

1 Like

just use 1/game:GetService"RunService".RenderStepped:Wait()

2 Likes

@Mimibienv

What do you mean by this?

Like where do you put it?

Thanks! usually the methods i was finding were absurd but this one is very practical. :smiley: