Advertisement
1m1m0

Star (Size & Color Jitter)

Jan 1st, 2024
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. local part = script.Parent
  2.  
  3. -- Color Randomizer --
  4.  
  5. function getRandomColor()
  6.     local red = math.random()
  7.     local green = math.random()
  8.     local blue = math.random()
  9.     return Vector3.new(red, green, blue)
  10. end
  11.  
  12. function changePartColor()
  13.     local color = getRandomColor()
  14.     part.Color = Color3.new(color.x, color.y, color.z)
  15. end
  16. changePartColor()
  17.  
  18. -- Size Randomizer --
  19.  
  20. function getRandomSize()
  21.     local sizeValue = math.random(300, 550) / 100
  22.     return Vector3.new(sizeValue, sizeValue, sizeValue)
  23. end
  24.  
  25. function changePartSize()
  26.     local size = getRandomSize()
  27.     part.Size = size
  28. end
  29. changePartSize()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement