Advertisement
foolkiller204

Rainbow Cube

Jan 26th, 2023 (edited)
795
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.53 KB | Source Code | 0 0
  1. --list of colors to run through
  2. local colors = {"Bright red", "Bright blue", "Lime green", "New Yeller", "Hot pink", "Toothpaste", "Deep orange"}
  3.  
  4. --creates new part
  5. local part = Instance.new("Part")
  6.  
  7. --Sets part properties
  8. part.Material = Enum.Material.Neon
  9. part.Position = Vector3.new(0,0,0)
  10. part.Size = Vector3.new(1,1,1)
  11. part.Parent = game.Workspace
  12. part.Name = "Rainbow Cube"
  13.  
  14. --Changes color every half second
  15. while true do
  16.     for _, color in ipairs(colors) do
  17.         part.BrickColor = BrickColor.new(color)
  18.         wait(.5)
  19.     end
  20. end
Tags: #roblox #lua
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement