other commenters say that this script is not accurate, I agree with them. For anyone who wants a proper script try this: local textLabel = script.Parent local runService = game:GetService("RunService") local GOOD_FPS = 30 local OK_FPS = 15 local lastFPS = 0 local updateInterval = 0.5 -- Update every half second local timeElapsed = 0 runService.RenderStepped:Connect(function(deltaTime) timeElapsed = timeElapsed + deltaTime if timeElapsed >= updateInterval then local currentFPS = 1 / deltaTime textLabel.Text = math.floor(currentFPS) .. " FPS" lastFPS = currentFPS timeElapsed = 0 -- Reset the elapsed time if currentFPS >= GOOD_FPS then textLabel.TextColor3 = Color3.new(0, 1, 0) -- Green for good FPS elseif currentFPS >= OK_FPS then textLabel.TextColor3 = Color3.new(1, 0.333333, 0) -- Orange for okay FPS else textLabel.TextColor3 = Color3.new(1, 0, 0) -- Red for poor FPS end end end)
This tutorial isn't accurate, or atleast the way the fps is gathered. Look at 5:33 - does that look like 6fps? It's not. That's because the method you used: `workspace:GetRealPhysicsFps` like the name states, only gathers the times per second the physics solver is stepping at, not your actual fps!! The way to fix this is to actually count the frames per second by incrementing a number every frame and then every second using that value as the fps, then setting it back to 0. Or you can opt to do what most people do and approximate the fps. You can do that by using `1 / deltaTime` as the fps. Since it is an estimate on how many times this frame could be rendered in one one second. Hope this helps
for anyone who is lazy to make the script or just does not want the model here is a script but it has no color change script: -- Kat Wrote this script, ORIGINAL script is from blufinity :D this script has no color change
more like this because you dont need to define good and ok fps: local texLabel = script.Parent local runService = game:GetService("RunService") runService.RenderStepped:Connect(function()
local currentFPS = workspace:GetRealPhysicsFPS() texLabel.Text = math.floor(currentFPS).." FPS"
@@scriptatupulus If you understand OOP (object-oriented programming), you'll know that workspace:GetRealPhysicsFPS() is equal to workspace.GetRealPhysicsFPS(workspace). the : is just passing the first variable automatically.
other commenters say that this script is not accurate, I agree with them. For anyone who wants a proper script try this: local textLabel = script.Parent
local runService = game:GetService("RunService")
local GOOD_FPS = 30
local OK_FPS = 15
local lastFPS = 0
local updateInterval = 0.5 -- Update every half second
local timeElapsed = 0
runService.RenderStepped:Connect(function(deltaTime)
timeElapsed = timeElapsed + deltaTime
if timeElapsed >= updateInterval then
local currentFPS = 1 / deltaTime
textLabel.Text = math.floor(currentFPS) .. " FPS"
lastFPS = currentFPS
timeElapsed = 0 -- Reset the elapsed time
if currentFPS >= GOOD_FPS then
textLabel.TextColor3 = Color3.new(0, 1, 0) -- Green for good FPS
elseif currentFPS >= OK_FPS then
textLabel.TextColor3 = Color3.new(1, 0.333333, 0) -- Orange for okay FPS
else
textLabel.TextColor3 = Color3.new(1, 0, 0) -- Red for poor FPS
end
end
end)
TYSM BRO THIS WORKS PERFECTLY
This tutorial isn't accurate, or atleast the way the fps is gathered. Look at 5:33 - does that look like 6fps? It's not. That's because the method you used: `workspace:GetRealPhysicsFps` like the name states, only gathers the times per second the physics solver is stepping at, not your actual fps!! The way to fix this is to actually count the frames per second by incrementing a number every frame and then every second using that value as the fps, then setting it back to 0. Or you can opt to do what most people do and approximate the fps. You can do that by using `1 / deltaTime` as the fps. Since it is an estimate on how many times this frame could be rendered in one one second. Hope this helps
Thanks so much this adds a lot to my new game!!!
Why haven’t done a live in 2 weeks
for anyone who is lazy to make the script or just does not want the model here is a script but it has no color change
script:
-- Kat Wrote this script, ORIGINAL script is from blufinity :D this script has no color change
more like this because you dont need to define good and ok fps:
local texLabel = script.Parent
local runService = game:GetService("RunService")
runService.RenderStepped:Connect(function()
local currentFPS = workspace:GetRealPhysicsFPS()
texLabel.Text = math.floor(currentFPS).." FPS"
why do you need to define good and ok fps if you’re not making it with the color
why does it say on my output "get real physics is not a valid member of workspace "Workspace"
It’s not workspace.GetRealPhysicsFPS() it’s workspace:GetRealPhysicsFPS() You are supposed to use a : not a dot
@@scriptatupulus If you understand OOP (object-oriented programming), you'll know that workspace:GetRealPhysicsFPS() is equal to workspace.GetRealPhysicsFPS(workspace). the : is just passing the first variable automatically.
Bruh, I don't want the physics FPS I want the .RenderStepped DeltaTime based FPS.
bro, this is bs. That ain't really an FPS counter. Just use the DeltaTime and divide 1 by it.
1/DeltaTime, then feel free to use math.round it :shrug:
how do you make a badge counter? I know this is very unrelated but if you know it would be great if you could help
Watch other vids of that
Your tutorial only shows the Physic Simulation fps not the actual fps of ur game
thats its not work on players who use fpsunlocker
Yo my friend is making a hunter x hunter game, he is new to development mabey u can give him some tips (Lemon 🍋)
wow bro you really helped me out bc you didnt use frame
im not good with frames
i sub and like
It worked but the colors didnt can you help?
do u want my code?
@@KylleOfficialSR no its fine i posted this about 4 months ago
@@HabibiX212 no its okay i have the code
@@KylleOfficialSR alr i will have it
@@HabibiX212 ok
That fake my fps is 120 but the conuter said that is 60 you sacmmer
Roblox has an FPS cap of 60. Stop raging 🤣
@@blufinityy use a fps unlocker you s**t
And then click shift + F5
just use a fps unlocker
@@blufinityy I have an fps unlocker, and the Roblox fps display says 250, but the one featured in your tutorial still says 60
hi
Give me script bruh
bullsh**
90th like lel