|
| 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 |
|
|
|
| 12 Dec 2016 01:32 PM |
"lightBulb.Enabled = false" is it meant to be lightbulb.pointlight.enabled |
|
|
| Report Abuse |
|
|
| |
|