I've made an fps gui/script, it all works fine, but i've made it so the text turns to red if it's smaller than 10, and attempted to make it go to it's original colour if it's greater than 10. It goes red, but it won't go yellow again (yes, it does go above 10, i reached 60). It's a LocalScript parented inside a TextBox, which is parented in a ScreenGui. Could someone please help me fix this? Thanks in advance.
wait(0.0000001)
local gui = script.Parent
local Format = "%.0f"
local delay = 0.0000001
function M8FPS()
while (true) do
local fps = game.Workspace:GetRealPhysicsFPS()
local fpstr = Format:format(fps)
gui.Text = fpstr
wait(delay)
if game.Workspace:GetRealPhysicsFPS() < 10 then
script.Parent.TextColor3 = Color3.new(206/255,0,0)
if game.Workspace:GetRealPhysicsFPS() > 11 then
script.Parent.TextColor3 = Color3.new(1,1,0)
end
end
end
end
M8FPS()

13 comments
Even with that change, it doesn't work.
Update with the new script.
The script is designed to go red if it's a value smaller than 10, and yellow if it's a value higher than 10. Both of the colours are correct.
Where's the new script?
You update your post with your new script.
Ok.
It's changed.
You didn't fix the colors. Color3s take decimal values.
updated.
still doesnt work, updated
format it right.
ok ill check now
thanks! it works great. i just started scripting yesterday so yeah lol ty