Checking if 25% of a number has passed by?

Hey there! So, title says it all, no scripts have been made yet i just have no idea how to do this as always

Let me give an example:
lets say i have a module, that gets percentage of a number. So:

local module = {}
local numStats = require(game:GetService("ReplicatedStorage"):WaitForChild("numStats"))

module.Calculate(num)
return num * numStats[num]
end

return module

but lets say i have a timer that counts down, what if i wanted to know when 25% of that number has passed?

Also, im using “numStats” because if i give every player a random number from numStats and i want to get another percentage based on the number then i could just configure it in the module

Thanks!!

Persentage = (Number / total) * 100

Then you can just use basic maths to check if the percentage is over 25%

2 Likes

Building off what @minimic2002 said,
You could check using an if statement something like:

if (number / total) >= 0.25 then
-- Do something
end
1 Like