mytouch
|
  |
| Joined: 31 Oct 2010 |
| Total Posts: 83 |
|
|
| 30 Apr 2016 04:03 PM |
I want a block to turn black or blue (50/50 chance) when i click it but im not sure how to make that happen.
Here's what i got so far:
script.Parent.Color = Color3.new("Really Black"),("Really Blue")
I know its wrong but what can i do to change it? Please help! Thanks!
PS, i already have the clicking the block part in the script |
|
|
| Report Abuse |
|
|
mytouch
|
  |
| Joined: 31 Oct 2010 |
| Total Posts: 83 |
|
| |
|
|
| 30 Apr 2016 04:19 PM |
| make it so tht it chooses a random number from 1 to 10 nd if the number is 2 or whatever you want it turns blue and if number is 5 thn black |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2016 04:21 PM |
| http://wiki.roblox.com/index.php?title=Random_numbers |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2016 04:21 PM |
How about this? I'm not really sure but it should look something like this.
local number = math.random(1,2) if number == 1 then script.Parent.Color = Color3.new("Really Black") elseif number == 2 then script.Parent.Color = Color3.new("Really Blue") end |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2016 04:24 PM |
| script.Parent.BrickColor = math.random() > .5 and BrickColor.new("Really black") or BrickColor.new("Really blue") |
|
|
| Report Abuse |
|
|
mytouch
|
  |
| Joined: 31 Oct 2010 |
| Total Posts: 83 |
|
| |
|