Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. local part = Instance.new("Part",workspace) --tells game to make a new instance, more specifically, a part.
  2.  
  3. part.Anchored = true --tells game that the part should be anchored so it doesnt fall
  4. part.CanCollide = true --tells game that the part should be collideable, so nothing can go through it
  5. part.Position = Vector3.new(0,2.5,0) --tells game what position the part should be moved to
  6.  
  7. math.randomseed(tick()) --starts a randomiser
  8.  
  9. local function cc() --function called 'cc' for 'colourChange'
  10. while true do --loop
  11. while wait(0.1) do --loop's 'wait' so the loop doesnt hang your script
  12. part.Color = Color3.fromRGB(math.random(0, 255), math.random(0, 255), math.random(0, 255)) --selects a random color
  13. end
  14. end
  15. end
  16. cc() --calls function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement