I wanna randomize a part instantly because it could randomize the same part for multiple attempts which takes time, I want it to somehow be instant.
My current code is:
function ChooseRandomBlock()
local block = nil
repeat wait()
local randomblock = script.BlockPos[math.random(1, #script.BlockPos:GetChildren())]
if not game.Workspace.Levels[Level]:FindFirstChild(randomblock.Name) then
block = randomblock
end
until not (block == nil)
return block
end
I mean wouldnt that basically be the same thing? Ill give it a try if you think otherwise. I am trying to somehow find a different method than the loop it self, Because i think the loop is whats taking the time.