-- ScriptsCodes | Roblox Studio Luau utility -- Run: Open your own place in Roblox Studio, choose View > Command Bar, paste this file, and press Enter. -- Output: Results appear in the Studio Output window. Edit the sample values before running. -- A tiny, reviewable helper with explicit input checks local function percentage(part, whole) assert(type(part) == "number", "part must be a number") assert(type(whole) == "number" and whole > 0, "whole must be positive") return math.clamp(part / whole, 0, 1) * 100 end print(string.format("%.1f%%", percentage(3, 8)))