of     1   

jarat7
#139881865Thursday, July 10, 2014 4:25 PM GMT

I am trying to make a lamp in my game. I have a brick, which inside has a PointLight, ClickDetector, and the script to make it work...except it WON'T work! The script is this - function onClick() if script.Parent.PointLight.Enabled == true then script.Parent.PointLight.Enabled = false elseif script.Parent.PointLight.Enabled == false then script.Parent.PointLight.Enabled = true end end script.Parent.Parent.ClickDetector.MouseClick:conncet(onClick) It seems to work if I make it instead of script.Parent.PointLight.Enabled making the script say game.Workspace.Lamp.PointLight.Enabled That would be a pain because I would have to rename all of the lamps in the game and there are going to be many of them...if anyone can help please do! :)
XlAscensionlX
#139886162Thursday, July 10, 2014 5:11 PM GMT

It's spelled Connect not Conncet.
Krypticon
#139888408Thursday, July 10, 2014 5:33 PM GMT

And you don't capitalise 'Connect' either, so it should be 'connect'. Also, if the script is directly inside of the part then instead of 'script.Parent.Parent' try: 'script.Parent'. (All of this is on the 'script.Parent.Parent.ClickDetector.MouseClick:conncet(onClick)' line by the way) Hope this helps.

    of     1