Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- you will need a ScreenGui and a TextLabel in StarterGui for this script to work
- -- use a LocalScript
- -- put the LocalScript inside the TextLabel
- local RunService = game:GetService("RunService")
- local player = game.Players.LocalPlayer
- local ScreenGui = player.PlayerGui:WaitForChild("ScreenGui")
- local TextLabel = ScreenGui:WaitForChild("TextLabel")
- local lastTime = tick()
- local frameCount = 0
- RunService.RenderStepped:Connect(function()
- frameCount = frameCount + 1
- local currentTime = tick()
- if currentTime - lastTime >= 1 then
- TextLabel.Text = "FPS: " .. frameCount
- frameCount = 0
- lastTime = currentTime
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment