Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would I create a completely randomized assortment of parts?

I would like to know how I can create an assortment of randomly placed parts on player entry.

Thank you.

5 comments

0

Please can you explain a bit more

0

I'm new to scripting, so I need assistance quite a bit. I would like to know how I can create parts randomly spread in a certain coordinate plain on player entry to the server. Thank you for commenting!

0

Could you give a hand-made example of what you mean? You're still really vague.

0

@adark I'm guessing he want's bricks to be created at different positions using tables and math.random()

0

Hex is correct.

1 answer

✓ Accepted answer
tableofpositions = {game.Workspace.brick.CFrame,game.Workspace.brick2.CFrame,game.Workspace.brick3.CFrame} -- Create 3 different bricks in workpace and exact same name,k!
game.Players.PlayerAdded:connect(function(plr)
 q = Instance.new("Part")
q.Anchored = true
q.Parent = game.Workspace
q.CFrame = tableofpositions[math.random(1,#tableofpositions)] 
end)


Make the brick invisible, mk!

Also make CanCollide Propery false for them inside the brick property.

This discussion is preserved as it was. New answers, comments, and votes are closed.