-- 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. local function divideSafely(numerator, denominator) if type(numerator) ~= "number" then return nil, "numerator must be a number" end if type(denominator) ~= "number" or denominator == 0 then return nil, "denominator must be non-zero" end return numerator / denominator end local result, err = divideSafely(10, 0) if not result then warn(err) else print(result) end