while wait(.1) do local RPart = Instance.new("Part", game.Workspace) RPart.BottomSurface = "Smooth" RPart.TopSurface = "Smooth" RPart.BrickColor = BrickColor.new(Color3.new(math.random(255), math.random(255), math.random(255))) end
I was wondering how to make the color random, I was also wondering how to make each part fly out in different directions, and get destroyed after 3 seconds. Can someone help me with that? Thanks!
Just use Brick.Random()
. This would make a random color from the 64 available colors.
while wait(.1) do local RPart = Instance.new("Part", game.Workspace) RPart.BottomSurface = "Smooth" RPart.TopSurface = "Smooth" RPart.BrickColor = BrickColor.Random() end
Hope it helps!
function PartColor() game.Workspace.RPart.BrickColor = BrickColor.random() end wait(.5) PartColor() wait(10) -- You can remove this if you like while true do wait(1) game.Workspace.RPart.Position = 1.8, 0.5, 13.6 wait(1) game.Workspace.RPart.Position = -34.3, 5.3, -9.5 wait(1) game.Workspace.RPart.Position = 13.4, 8.1, 28.8 wait(.5) game.Workspace.RPart:Destroy() end
I tried my best, Hope it helps!