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 make bricks spawn at random on the map?

This is my script in ServerScriptService:

local part = game.ServerStorage.Brick
while true do
     wait(12)
     local clone = part:Clone()
     clone.Parent = workspace
     clone.Position = Vector3.Random()
end

Of course this didn't work. Could someone please show me how to do this?

1 answer

✓ Accepted answer

Instead of Vector3.Random() it would be:

Vector3.new(math.random(-100,100),math.random(-100,100),math.random(-100,100))

The -100 represents the lowest number it will choose from and the 100 representing the highest. You can change them to how you see fit. The reason yours did not work is because you have to specify the XYZ.

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