I would like to know how I can create an assortment of randomly placed parts on player entry.
Thank you.
I would like to know how I can create an assortment of randomly placed parts on player entry.
Thank you.
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.
5 comments
Please can you explain a bit more
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!
Could you give a hand-made example of what you mean? You're still really vague.
@adark I'm guessing he want's bricks to be created at different positions using tables and math.random()
Hex is correct.