DjBadyBoy
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 681 |
|
|
| 07 Oct 2012 02:15 PM |
Script:
function onClick() local car = game.Lighting.NPC:clone() car.Parent = game.Workspace car:makeJoints() end script.Parent.ClickDetector.MouseClick:connect(onClicked)
output:
22:14:13 - attempt to call a nil value 22:14:13 - Disconnected event because of exception |
|
|
| Report Abuse |
|
|
|
| 07 Oct 2012 02:16 PM |
function onClick() local car = game.Lighting.NPC:clone() car.Parent = game.Workspace car:makeJoints() end script.Parent.ClickDetector.MouseClick:connect(onClick) |
|
|
| Report Abuse |
|
|
DjBadyBoy
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 681 |
|
|
| 07 Oct 2012 02:17 PM |
| Thanks, never noticed the ed at the end of click :P |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 07 Oct 2012 02:17 PM |
Add a clickdetector in it, and put this in it:
function onClick() local car = game.Lighting.NPC:clone() car.Parent = game.Workspace car:MakeJoints() end script.Parent.ClickDetector.MouseClick:connect(onClicked)
|
|
|
| Report Abuse |
|
|
|
| 07 Oct 2012 02:19 PM |
^ That wouldn't work. He does have a ClickDetector. And you didn't change anything. |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 07 Oct 2012 02:20 PM |
| So didnt u, but i made MakeJoints, and not makeJoints :P |
|
|
| Report Abuse |
|
|
| |
|
DjBadyBoy
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 681 |
|
| |
|