|
| 20 Jan 2014 08:24 PM |
Why doesn't this work?
function onTouched(hit) game.Workspace.Gate1.Part.Pointlight.Brightness = Brightness.New(1) end
script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
|
| 20 Jan 2014 08:25 PM |
function onTouched(hit) game.Workspace.Gate1.Part.Pointlight.Brightness = Brightness.New(1) end
>Brightness.New(1)
Putting the name of a property, followed by .New, doesn't make it a script. Brightness is a number, and nothing more. Need proof? http://wiki.roblox.com/index.php/Brightness_(Property)
function onTouched(hit) game.Workspace.Gate1.Part.Pointlight.Brightness = 1 end |
|
|
| Report Abuse |
|
|
| |
|
shawnyg
|
  |
| Joined: 21 Apr 2011 |
| Total Posts: 1428 |
|
|
| 20 Jan 2014 08:31 PM |
function onTouched(hit) game.Workspace.Gate1.Part.Pointlight.Brightness = game.Workspace.Gate1.Part.Pointlight.Brightness + 1 --Is this what you needed? end
~Hope I helped, if you need a script, PM me. ~Glory to CAT!~ ~CAT General Shawnyg~ |
|
|
| Report Abuse |
|
|
|
| 20 Jan 2014 08:31 PM |
Congratulations.
Then either "game.Workspace.Gate1.Part.Pointlight" doesn't exist, or you never linked the onTouched function to the actual event. |
|
|
| Report Abuse |
|
|
|
| 20 Jan 2014 08:34 PM |
function onTouched() game.Workspace.Gate1.Part.Pointlight.Brightness = 1 end script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
|
| 20 Jan 2014 08:39 PM |
| Secondary that's what I have. |
|
|
| Report Abuse |
|
|
|
| 20 Jan 2014 08:40 PM |
| @RawDelight I have no idea what that means.... D: |
|
|
| Report Abuse |
|
|
|
| 20 Jan 2014 08:41 PM |
| @All Nothing's working.... |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 20 Jan 2014 09:10 PM |
script.Parent.Touched:connect(function(onTouched) game.Workspace.Gate1.Part.Pointlight.Brightness = 1 end |
|
|
| Report Abuse |
|
|
|
| 21 Jan 2014 05:36 AM |
| Are you sure this will work because I'm tired of testing out scripts and having them fail. |
|
|
| Report Abuse |
|
|
| |
|
|
| 21 Jan 2014 05:48 AM |
No, Goulstem's code is broken, as he completely messed it up. My code was fine, it's something that is wrong with what I told you.
Also, PiggyJingles has officially warned you to get out or be eaten. |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 21 Jan 2014 06:32 AM |
| He spelled PointLight wrong. |
|
|
| Report Abuse |
|
|
| |
|