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
 

This script has somthing wrong with it?

Previous Thread :: Next Thread 
thatkane is not online. thatkane
Joined: 25 Feb 2011
Total Posts: 17078
03 Sep 2011 11:41 PM
local A
local B
local C
local NewColor = "RNew Yeller"
local Mode = 1

A = Instance.new("ClickDetector")
A.Parent = script.Parent
A.Name = "Clicker"
B = Instance.new("BrickColorValue")
B.Parent = script.Parent
B.Name = "Orig"
B.Value = script.Parent.BrickColor
C = Instance.new("BrickColorValue")
C.Parent = script.Parent
C.Name = "NewCol"
C.Value = BrickColor.new(NewColor)

function click()
if Mode == 1 then
Mode = 2
script.Parent.BrickColor = C.Value
elseif Mode == 2 then
Mode = 1
script.Parent.BrickColor = B.Value
end
end

A.MouseClick:connect(click)
Report Abuse
izzatnasruna is not online. izzatnasruna
Joined: 09 Jun 2009
Total Posts: 1927
03 Sep 2011 11:42 PM
Yes,

local A;
local B;
local C;
Report Abuse
thatkane is not online. thatkane
Joined: 25 Feb 2011
Total Posts: 17078
03 Sep 2011 11:42 PM
I made it for a lightbulb and i cant figure out whats wrong with it.
Report Abuse
izzatnasruna is not online. izzatnasruna
Joined: 09 Jun 2009
Total Posts: 1927
03 Sep 2011 11:44 PM
local NewColor = "RNew Yeller"
local Mode = 1

local A = Instance.new("ClickDetector")
A.Parent = script.Parent
A.Name = "Clicker"
local B = Instance.new("BrickColorValue")
B.Parent = script.Parent
B.Name = "Orig"
B.Value = script.Parent.BrickColor
local C = Instance.new("BrickColorValue")
C.Parent = script.Parent
C.Name = "NewCol"
C.Value = BrickColor.new(NewColor)

function click()
if Mode == 1 then
Mode = 2
script.Parent.BrickColor = C.Value
elseif Mode == 2 then
Mode = 1
script.Parent.BrickColor = B.Value
end
end

A.MouseClick:connect(click)
Report Abuse
thatkane is not online. thatkane
Joined: 25 Feb 2011
Total Posts: 17078
03 Sep 2011 11:45 PM
Ohhh! thank you!
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