|
| 14 Apr 2015 06:47 PM |
script.Parent.ClickDetector.MouseClick:connect(function(player) if game.Workspace.part1.BrickColor == BrickColor.new("White") and game.Workspace.part2.Friction == 0.1 then print("yes") |
|
|
| Report Abuse |
|
|
| |
|
blox6137
|
  |
| Joined: 23 Nov 2008 |
| Total Posts: 1109 |
|
|
| 14 Apr 2015 06:50 PM |
| do you have an end to that function |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 14 Apr 2015 06:53 PM |
" BrickColor.new("White") "
just change it to "White" |
|
|
| Report Abuse |
|
|
|
| 14 Apr 2015 06:56 PM |
| there was an end and that does not fix it coin. |
|
|
| Report Abuse |
|
|
blox6137
|
  |
| Joined: 23 Nov 2008 |
| Total Posts: 1109 |
|
|
| 14 Apr 2015 07:08 PM |
it has to do with how you're checking the friction of part2. you can't try and get it like that. also, to get the brick color, do "if part1.BrickColor == BrickColor.White() then"
I'm trying to figure out how to get the friction. brb |
|
|
| Report Abuse |
|
|
blox6137
|
  |
| Joined: 23 Nov 2008 |
| Total Posts: 1109 |
|
|
| 14 Apr 2015 07:15 PM |
local part1 = game.Workspace.part1 local part2 = game.Workspace.part2 local host = game.Workspace.part3 local clickDetect = Instance.new("ClickDetector") clickDetect.Parent = host
function one() print[[pre-test passed]] if part1.BrickColor == BrickColor.new("White") and part2.Friction > 0.09 and part2.Friction < 0.11 then print[[post-test passed]] end end
clickDetect.MouseClick:connect(one)
I've found out that the friction of an object is not permanent. The friction of an object in my game, was set to "0.1", but the actual friction was 0.10000000149012".
To do what you want, you should do this instead of what you had:
if part1.BrickColor == BrickColor.new("White") and part2.Friction > 0.09 and part2.Friction < 0.11 then [code] end |
|
|
| Report Abuse |
|
|
blox6137
|
  |
| Joined: 23 Nov 2008 |
| Total Posts: 1109 |
|
|
| 14 Apr 2015 07:20 PM |
| that will be 6 dollars kthx |
|
|
| Report Abuse |
|
|