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 » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Why won't this work?

Previous Thread :: Next Thread 
DjBadyBoy is not online. 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
blackboy167thst is not online. blackboy167thst
Joined: 22 Jul 2011
Total Posts: 2468
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 is not online. 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 is not online. 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
blackboy167thst is not online. blackboy167thst
Joined: 22 Jul 2011
Total Posts: 2468
07 Oct 2012 02:19 PM
^
That wouldn't work. He does have a ClickDetector. And you didn't change anything.
Report Abuse
Fedorakid is not online. 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
blackboy167thst is not online. blackboy167thst
Joined: 22 Jul 2011
Total Posts: 2468
07 Oct 2012 02:21 PM
They're the same thing.
Report Abuse
DjBadyBoy is not online. DjBadyBoy
Joined: 01 Aug 2011
Total Posts: 681
07 Oct 2012 02:27 PM
lol
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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