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 » Roblox » Help (Technical Support and Account Issues)
Home Search
 

Re: Script help

Previous Thread :: Next Thread 
camgoucher123 is online. camgoucher123
Joined: 16 Dec 2014
Total Posts: 32
12 Dec 2016 01:28 PM
local lightBulb = game.Workspace.Light.LightHolder.lightBulb
local Sound = game.Workspace.Light.Part.Sound

lightBulb.Enabled = false





function onClicked(playerWhoClicked)
if
lightBulb.PointLight.Enabled == false then
lightBulb.PointLight.Enabled = true
Sound:play()
end
end
script.Parent.ClickDetector.mouseClick:connect(onClicked)

Why won't it work? Here is the output log.
14:23:18.508 - Enabled is not a valid member of Part
14:23:18.509 - Stack Begin
14:23:18.509 - Script 'Workspace.Light.Part.Script', Line 4
14:23:18.509 - Stack End
14:23:23.518 - Something unexpectedly tried to set the parent of Script to 4D Being while trying to set the parent of Script. Current parent is Model. (x3)
14:23:23.522 - Something unexpectedly tried to set the parent of Script to 4D Being while trying to set the parent of Script. Current parent is 2nd Floor.
14:23:23.523 - Something unexpectedly tried to set the parent of Script to 4D Being while trying to set the parent of Script. Current parent is Model.
14:23:23.524 - Something unexpectedly tried to set the parent of Script to 4D Being while trying to set the parent of Script. Current parent is Light.
14:23:23.525 - Something unexpectedly tried to set the parent of Script to 4D Being while trying to set the parent of Script. Current parent is Player1.
Report Abuse
TheFishToucher is not online. TheFishToucher
Joined: 07 Jul 2012
Total Posts: 7995
12 Dec 2016 01:32 PM
"lightBulb.Enabled = false"
is it meant to be lightbulb.pointlight.enabled
Report Abuse
Untethered is not online. Untethered
Joined: 11 Jun 2010
Total Posts: 10359
12 Dec 2016 02:46 PM
^^




Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Roblox » Help (Technical Support and Account Issues)
   
 
   
  • 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