Hey fellow scripters! I have a decent random array of tiles that generate on server startup, it works fine. There are 6 variants right now with each a tag(Purple = 6 Blue = 5 Orange = 2 Yellow = 3 Red = 1 Green = 4). The script prints out/ sets a value to the tag id. Each tag is separated by a "-"(Hiphyn). A working 5x5 random generation can be found here: (https://gyazo.com/e68c8b65af3962d0c2ae108f71769b3e) The seed for that generation would be: "6-6-3-2-3-4-1-6-2-6-6-2-2-5-1-2-3-6-1-2-1-1-1-3-6" . (That can later be shortened to an 8 digit code stored in a datastore with the above seed attached) The problem right now is trying to get the script to redo the same seed. I have a kind of working script that builds all the blocks on the z-axis, but can't build on the x-axis to make the square. Edit: It makes 5 rows of all 25 seed components. My brain is fried from all my school work and the fact I've been trying to get this working all day today. I've attached some script I hope you guys/girls can help me figure it out. If you need more info please comment on it and I will try to add it to the question, or you can message me on Discord(TheLeader_TimJunior#1924). I can send a copy to anyone who wants it...
Variables are defined at the beginning of the script but I didn't include them in the samples. Also this is 1/2 way through it, where it is deciding what to do with the seed.
else
local Seed = script.Seed.Value
local SplitSeed = Seed:split("-")
local LookFor = Instance.new("IntValue")
for i = 1,(NumberOfRows) do
for i = 1,(NumberOfTilesInRow) do
for i,v in pairs(SplitSeed) do
LookFor.Value = v
local Generation = game.ServerStorage.Generation:GetChildren()
for i,v in pairs(Generation) do
if v.Tag.Value == LookFor.Value then
local NewTile = v:Clone()
NewTile.Parent = game.Workspace
NewTile.Position = Vector3.new(0,0,0)
NewTile.CFrame = NewTile.CFrame + Vector3.new(Positionx*25,0,0)
NewTile.CFrame = NewTile.CFrame + Vector3.new(0,0,Positionz*25)
NewTile.CFrame = NewTile.CFrame + Vector3.new(0,Positiony,0)
Positionx = Positionx + 1
end
end
end
end
Positionx = 0
Positionz = Positionz + 1
wait()
end
end
I can explaining my reasoning/script in the comments. I just didn't know what was self explanatory or not...
Edit: Image of seed generation of the seed from the example (https://gyazo.com/ac8d03d6fc1a1beaf947d3ae1fa0ec9e)

2 comments
I think i might need to get the number of tiles in the seed then find the square root....
That didnt work :man-facepalm: it made each tile a 5,5 of itself