Percentage-Based Color Randomizer | Plugin

Hi, I made a pretty simple plugin that randomizes the colors parts based on percentages you put in.
Works with selected parts or models!

This is also my first time making a Plugin, I mainly created this to practice some codin’.

Here is a video on how it works:

Notes:
~The percentages need to add up to exactly 100, but it will tell you if you undershoot or overshoot it. While telling you the sum, that way you don’t need to m a t h.
~You’re not able to type decimals.
~Cats do not exist.

Here is the plugin!
https://www.roblox.com/library/10344128478/Percentage-Based-Color-Randomizer

9 Likes

Very simple and useful, I can see myself using this to give tree leaves color variety. Thanks!

I’m not too sure how you’re handling the percentages, but I suggest making it so the percentage can go past 100 as it is possible.

You can achieve it with something like this:

local function GetColor(Colors)
	local Chances = {}

	for Color, Chance in pairs(Colors) do
		for i = 1,Chance do
			table.insert(Chances, Color)
		end
	end

	return Chances[math.random(1,#Chances)]
end

local Colors = { -- Color, Chance. This is just an example table, the colors would be color3's
	["Green"] = 75,
	["Blue"] = 35,
	["Yellow"] = 250,
}

local ChosenColor = GetColor(Colors)
print(ChosenColor)

Neat!
This was also my first time makin’ RNG, just for this plugin.
So I’ll try out your example when I get the time.

1 Like

Yo!
It has been about a year since I made this funky plugin, and I randomly remembered this existed a while ago. So, with that realization, I decided to do a total remake!

It’s still the same simple randomizer but now it’s kinda better!!!

Main Cool Things:

  • No more 100% restriction
  • Include more or less than the 5 color boxes
  • Colors more stuff such as lights, decals, and textures (anything else?)
  • Uhhh cool widget

Footage:


Since this is an upgraded/plus/+/2.0/pro plugin it’s priced at the minimum of 100 :robux_light:

So, If ya want it, you want it! If ya don’t, ya don’t! If then else end!

this may be necro-posting, but I’ve been trying to google a random part colorer all day. Going to try this today, thank you

1 Like