Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I create a completely randomized assortment of parts?

Asked by 10 years ago

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

Thank you.

0
Please can you explain a bit more HexC3D 830 — 10y
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! DrCylonide 158 — 10y
0
Could you give a hand-made example of what you mean? You're still really vague. adark 5487 — 10y
0
@adark I'm guessing he want's bricks to be created at different positions using tables and math.random() HexC3D 830 — 10y
0
Hex is correct. DrCylonide 158 — 10y

1 answer

Log in to vote
1
Answered by
HexC3D 830 Moderation Voter
10 years ago
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.

Ad

Answer this question