generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Why won't this work small part of code.

Previous Thread :: Next Thread 
ReverseUniverse is not online. ReverseUniverse
Joined: 23 Jan 2015
Total Posts: 1118
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
ReverseUniverse is not online. ReverseUniverse
Joined: 23 Jan 2015
Total Posts: 1118
14 Apr 2015 06:49 PM
1
Report Abuse
blox6137 is not online. blox6137
Joined: 23 Nov 2008
Total Posts: 1109
14 Apr 2015 06:50 PM
do you have an end to that function
Report Abuse
ReverseUniverse is not online. ReverseUniverse
Joined: 23 Jan 2015
Total Posts: 1118
14 Apr 2015 06:51 PM
yes..
Report Abuse
secret6timb1 is not online. secret6timb1
Joined: 11 Sep 2013
Total Posts: 1817
14 Apr 2015 06:52 PM
There's not an end.
Report Abuse
Coinman001 is not online. Coinman001
Joined: 10 Apr 2012
Total Posts: 56149
14 Apr 2015 06:53 PM
" BrickColor.new("White") "

just change it to "White"
Report Abuse
ReverseUniverse is not online. ReverseUniverse
Joined: 23 Jan 2015
Total Posts: 1118
14 Apr 2015 06:56 PM
there was an end and that does not fix it coin.
Report Abuse
blox6137 is not online. 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 is not online. 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 is not online. blox6137
Joined: 23 Nov 2008
Total Posts: 1109
14 Apr 2015 07:20 PM
that will be 6 dollars kthx
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image