I had a guy help me with my Region3 Script, it works, but I have a problem understanding some of the code, and I was wondering if you guys can explain it to me or something. There are a couple of new concepts I have not learned yet.
Here is the code, I cant remember who helped me, he did most of the heavy lifting.
Thank you for your time.
local Workspace = workspace
local Part1 = Workspace.Region3Folder.F
local Part2 = Workspace.Region3Folder.E
local RandomObject = Random.new()
local function RandomPoint(Part1, Part2, Axis) --Part1, Part2, Axis.
return RandomObject:NextNumber(math.min(Part1.Position[Axis], Part2.Position[Axis]), math.max(Part1.Position[Axis], Part2.Position[Axis]))
end
local function SpawnRandomPart(Part1, Part2)
local Part = workspace.Meteor:Clone()
Part.Name = "MeteorDestroy"
Part.Position = Vector3.new(RandomPoint(Part1, Part2, "X"),RandomPoint(Part1, Part2, "Y") ,RandomPoint(Part1, Part2, "Z"))
--print(Part.Position)
Part.Parent = Workspace
end
for i = 1, math.huge do
wait(2)
SpawnRandomPart(Part1, Part2)
end