Hello
Not really sure with the title as what to call it, but I think people would get the general idea of what this thread is about. It’s a simple thing that I’m sure someone could solve quickly, but I also couldn’t find any other threads about this.
So, I have a system where I want x to be able to define an identifier in y x is randomly generated through math.Random and is assigned to an IntValue.
Now I would like a script to make it so that the value assigned to “BiomeID” (The IntValue) is replicated to one of the Unions under “SimpleBiomes”. For example, if math.Random assigns a value of 1 to the IntValue, I will be able to idenfity the Union, in this case, “1”.
I have created this script so far. local ChunkGenerationID = script.Parent.BiomeID.Value game.Workspace.Biomes.SimpleBiomes.
after “SimpleBiomes” I want it to pick the union which was assigned by the BiomeID.
FindFirstChild by definition returns the first object it finds that matches in name, so you can access the properties of biome with it. Say it had a Value inside, you could find that by using the new biome variable
local someOddValue = biome.variableName.Value -- It can find children inside.
local transparency = biome.Transparency -- you can also get these too.