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: Help me fix my script?

Previous Thread :: Next Thread 
CalSwagDistrict is not online. CalSwagDistrict
Joined: 25 Jan 2012
Total Posts: 3733
23 Jun 2014 01:15 PM
So my script won't activate the value, and it isn't another script because if I manually put the value it works.

bin = script.Parent
lon = bin.Lights_On
loff = bin.Lights_Off
charger = game.Workspace.Charger
lights = charger.Lights.Strobe

function LONClick()
lights.Value.Value = true
end

lon.MouseButton1Down:connect(LONClick)

function LOFFClick()
lights.Value.Value = false
end

loff.MouseButton1Down:connect(LOFFClick)
Report Abuse
NardzNation is not online. NardzNation
Joined: 22 Jul 2011
Total Posts: 93
23 Jun 2014 01:21 PM
Try changing: lights.Value.Value with something else. Change the name of Value to something like On or TurnOn. I think having as Value might stop it from going through. I'm new to scripting in a way but i think that could fix it.
Report Abuse
CalSwagDistrict is not online. CalSwagDistrict
Joined: 25 Jan 2012
Total Posts: 3733
23 Jun 2014 02:01 PM
The first value finds the value then the second value along with "= true" makes it turn on.
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
23 Jun 2014 02:04 PM
Whats wrong with these F5 bombers
Report Abuse
CalSwagDistrict is not online. CalSwagDistrict
Joined: 25 Jan 2012
Total Posts: 3733
23 Jun 2014 02:05 PM
No idea.
Report Abuse
CalSwagDistrict is not online. CalSwagDistrict
Joined: 25 Jan 2012
Total Posts: 3733
23 Jun 2014 02:09 PM
I also tried this:

bin = script.Parent
lon = bin.Lights_On
loff = bin.Lights_Off
local Lights = script.Parent.Lights.Value

function LONClick()
Lights.Strobe.Value = true
end

lon.MouseButton1Down:connect(LONClick)

function LOFFClick()
Lights.Strobe.Value = false
end

loff.MouseButton1Down:connect(LOFFClick)
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