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 » Scripting Helpers
Home Search
 

Re: I need help with this script.

Previous Thread :: Next Thread 
zZxTheBuilderxZz is not online. zZxTheBuilderxZz
Joined: 26 Oct 2013
Total Posts: 89
21 Mar 2014 04:07 PM
The script is supposed to change the color of the part and change the boolvalue of toggle, but it won't do either! (Sorry if I spelt that wrong.)

local color = script.Parent.BrickColor
local cd = script.ClickDetector
local onoff = script.Parent.Toggle.Value

function Clicked(Player)
if color == (1) then
color = (26)
onoff = true
else
color = (1)
onoff = false
end
end

Thanks!

"Being here will ruin everything we've already done."
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
21 Mar 2014 04:09 PM
cd.MouseClick:connect(Clicked)
on final line.
Report Abuse
zZxTheBuilderxZz is not online. zZxTheBuilderxZz
Joined: 26 Oct 2013
Total Posts: 89
21 Mar 2014 04:15 PM
Wow, it was that easy to fix. _-_
Thanks!

"Being here will ruin everything we've already done."
Report Abuse
zZxTheBuilderxZz is not online. zZxTheBuilderxZz
Joined: 26 Oct 2013
Total Posts: 89
21 Mar 2014 04:19 PM
local color = script.Parent.BrickColor
local cd = script.ClickDetector
local onoff = script.Parent.Toggle.Value

function Clicked(Player)
if color == (1) then
color = (26)
onoff = true
else
color = (1)
onoff = false
end
end

cd.MouseClick:connect(Clicked)

Still does not do anything. :P

"Being here will ruin everything we've already done."
Report Abuse
zZxTheBuilderxZz is not online. zZxTheBuilderxZz
Joined: 26 Oct 2013
Total Posts: 89
21 Mar 2014 04:45 PM
Bump

"Being here will ruin everything we've already done."
Report Abuse
zZxTheBuilderxZz is not online. zZxTheBuilderxZz
Joined: 26 Oct 2013
Total Posts: 89
21 Mar 2014 04:51 PM
Bump
Report Abuse
zZxTheBuilderxZz is not online. zZxTheBuilderxZz
Joined: 26 Oct 2013
Total Posts: 89
21 Mar 2014 09:02 PM
B3
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
21 Mar 2014 09:04 PM
local color = script.Parent.BrickColor
local cd = script.ClickDetector
local onoff = script.Parent.Toggle.Value

function Clicked(Player)
if color == (1) then
color = (26)
onoff = true
else
color = (1)
onoff = false
end
end

cd.MouseClick:connect(Clicked)

why're you using numbers for the brick color? use a string.
-=Robo=-
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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