#how do i make a specific randomizer?
33 messages · Page 1 of 1 (latest)
I'm making something @clear flame , once I finish I'll lyk how to make it and send code
alright
@clear flame Let me ask a few questions, firstly what is your knowledge with Lua and Luau?
for roblox studio ive been scripting for only 1 year
ive never tried luau for something else than roblox studio
well luau is only available for Roblox
oh then its lua
By my understanding you want a randomizer that checks for 10 parts, and wants the parts to be subdivided in "categories" color coded?
yes
It's extremely late rn @clear flame so ima just give u half of what I've done and explain tomorrow
uh
It wont let me send code
Use i,v pairs and math.random
Oh actually
Use for loop to check how many of each colour there are
Example:
if greenCount >= 2 then greenProbability == 0 end
if grayCount >= 7 then grayProbability == 0 end```
Then u use i,v pairs and math.random to randomize the colours based on the sumed probabilities
I suppose u understand the rest if u have 1yr+ lua experience
** You are now Level 7! **
Yea ur not supposed to spoonfeed
You want certain colours to be more rare, @clear flame?
Or are you just colouring a certain number of parts per random colour?
Certain colors to be rare
You're looking for the Weighted Random algorithm
So what does that mean?
** You are now Level 2! **
?
What is the weighted random algorithm
Mate. You live in the 21st century. Google it 
TL;DR: It's an algorithm that enables you to attach weights (chances) to values so you can directly manipulate the likelihood of getting one of those values
Womp womp I want a challenge