Hold on, why would ugly coding matter?
Do you collaborate between different script’ers and thus it is why it is important to have proper easily understandable formatting?
Otherwise, only you’ll be the only one able to see the code.
But to reply to OP’s post, I think it’s not a bad feature to have if there’s another variable that helps with math.random code. I also use math.random and having shortcuts is always good to go for these things. It’ll make little room for error.
That’s not really the feature request, he wants a random function that returns a random float between a and b, instead of an integer. Besides, your code example has limited significance (only 1 decimal).
Which is why you can use a function or module. Write it once and point to it in all scripts that require it. Then you’ll never have to think about it again.
This request is something that’s really easy to make by yourself and I don’t think it’s worth the effort to add it.
Edit: I thought I replied to PlaceRebuilder specifically. Apparently I didn’t. I really have to get used to this new software…
Yes, making a global function or make a module, using require in every script you want to use the simple function, that’s what I ment feels unnessecary.
Doing “Utils.randomf” or “math.randomf” is almost no difference.
The only difference is at the top: local Utils = require(1234)
(Using an assetId because that’s the easiest, but not necessary)
The whole reason Lua exists is because people needed a compact multi-platform language.
Why it is so compact is because it lacks tons of useful functions, such as math.randomfloat
Roblox could surely add a lot to it, including this, but I think they want to keep it as compact as possible.
You do this in every programming language though. At the top of every single one of your files, you have lines and lines of just imports. “import java.awt.Color;” is hardly different from “require(game.ReplicatedStorage.Color)” Sure, game.ReplicatedStorage is a bit annoying to type out, but once you’re done typing it, it’s no different from “import java.awt.Color;”.
I guess it is kind of ugly though. It would be neat if ROBLOX could detect a block of requires at the top of your script as just importing stuff, allow you to collapse it, and then maybe create a window you could dock that had a list of all of the variable names of the things you imported for quick reference.