How To Make A FPS COUNTER (Roblox Studio)

Поделиться
HTML-код
  • Опубликовано: 26 окт 2024

Комментарии • 38

  • @даня-щ3у
    @даня-щ3у Месяц назад +1

    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)

  • @HashCollision
    @HashCollision Год назад +5

    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

  • @Gam3_sarge
    @Gam3_sarge 2 месяца назад

    Thanks so much this adds a lot to my new game!!!

  • @Kaispeedclip
    @Kaispeedclip Год назад +1

    Why haven’t done a live in 2 weeks

  • @katateurcookiez
    @katateurcookiez Год назад +2

    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

    • @zackablanc
      @zackablanc 9 месяцев назад

      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"

    • @AwsomeTanqRWarriorYT
      @AwsomeTanqRWarriorYT 2 месяца назад

      why do you need to define good and ok fps if you’re not making it with the color

  • @jaydencadelina
    @jaydencadelina Год назад

    why does it say on my output "get real physics is not a valid member of workspace "Workspace"

    • @scriptatupulus
      @scriptatupulus Год назад

      It’s not workspace.GetRealPhysicsFPS() it’s workspace:GetRealPhysicsFPS() You are supposed to use a : not a dot

    • @Beij1ngCorn
      @Beij1ngCorn Год назад +1

      @@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.

  • @cbob81514
    @cbob81514 9 месяцев назад

    Bruh, I don't want the physics FPS I want the .RenderStepped DeltaTime based FPS.

  • @LazyP1nk
    @LazyP1nk 2 месяца назад

    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:

  • @zbritishteaman
    @zbritishteaman Год назад

    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

    • @Duncan-MDP
      @Duncan-MDP Год назад

      Watch other vids of that

  • @scripteddev_
    @scripteddev_ Год назад

    Your tutorial only shows the Physic Simulation fps not the actual fps of ur game

  • @seindor2251
    @seindor2251 11 месяцев назад

    thats its not work on players who use fpsunlocker

  • @godusopp3421
    @godusopp3421 Год назад +1

    Yo my friend is making a hunter x hunter game, he is new to development mabey u can give him some tips (Lemon 🍋)

  • @jojois0
    @jojois0 Год назад

    wow bro you really helped me out bc you didnt use frame
    im not good with frames
    i sub and like

  • @HabibiX212
    @HabibiX212 Год назад

    It worked but the colors didnt can you help?

  • @lolcool_f
    @lolcool_f Год назад +1

    That fake my fps is 120 but the conuter said that is 60 you sacmmer

    • @blufinityy
      @blufinityy  Год назад +1

      Roblox has an FPS cap of 60. Stop raging 🤣

    • @lolcool_f
      @lolcool_f Год назад

      @@blufinityy use a fps unlocker you s**t

    • @lolcool_f
      @lolcool_f Год назад +1

      And then click shift + F5

    • @alexma4603
      @alexma4603 Год назад

      just use a fps unlocker

    • @Beij1ngCorn
      @Beij1ngCorn Год назад

      @@blufinityy I have an fps unlocker, and the Roblox fps display says 250, but the one featured in your tutorial still says 60

  • @viktoriahasanlliu6503
    @viktoriahasanlliu6503 Год назад

    hi

  • @viruskiev4
    @viruskiev4 3 месяца назад

    Give me script bruh

  • @FreeOrange
    @FreeOrange Год назад

    bullsh**

  • @3.5grandkid
    @3.5grandkid Год назад

    90th like lel