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: [Help] ClickDetector:connect is invalid Function

Previous Thread :: Next Thread 
Darkaaja is not online. Darkaaja
Joined: 24 Sep 2009
Total Posts: 178
17 Jul 2011 04:53 PM
Read Title... Thats the error and I dont know what I can do to fix it...

local door = game.Workspace.Base.BaseWall.Door

script.Parent.ClickDetector:connect(function()
repeat until door.Position == Vector3.new(62, 8.9, -22)
door.Position = Vector3.new(door.Position + 0,0,-1)
end)
Report Abuse
Seranok is not online. Seranok
Joined: 12 Dec 2009
Total Posts: 11083
17 Jul 2011 04:55 PM
You must have a ClickDetector inside the script.Parent and then say

script.Parent.ClickDetector.MouseClick:connect(
Report Abuse
Darkaaja is not online. Darkaaja
Joined: 24 Sep 2009
Total Posts: 178
17 Jul 2011 04:58 PM
Its in the proper place its output saying Connect is an invalid function for ClickDetector
Report Abuse
DingDong272 is not online. DingDong272
Top 100 Poster
Joined: 08 Dec 2007
Total Posts: 9860
17 Jul 2011 04:59 PM
...
...

You don't use connect, you use MouseClick:

script.Parent.ClickDetector.MouseClick:connect(function() end)
.....................................^^^^^^^
Report Abuse
Camoy is not online. Camoy
Joined: 21 May 2009
Total Posts: 6207
17 Jul 2011 05:02 PM
Yeah, my fault... I typed too fast I didn't add event line in (I gave him teh code for this one).
Report Abuse
DingDong272 is not online. DingDong272
Top 100 Poster
Joined: 08 Dec 2007
Total Posts: 9860
17 Jul 2011 05:06 PM
*GASP*
I'm gonna give you a slap on the wrist for that one.
Report Abuse
Camoy is not online. Camoy
Joined: 21 May 2009
Total Posts: 6207
17 Jul 2011 05:08 PM
Oh don't act as if you haven't done it too :P
Report Abuse
Darkaaja is not online. Darkaaja
Joined: 24 Sep 2009
Total Posts: 178
17 Jul 2011 05:10 PM
Still not working


local door = game.Workspace.Base.BaseWall.Door

script.Parent.ClickDetector:connect(function()
repeat until door.Position == Vector3.new(62, 8.9, -22)
door.Position = Vector3.new(door.Position + 0,0,-1)
end)

If I add .MouseClick after ClickDetector The game freezes when I click it.
Report Abuse
unknown89089 is not online. unknown89089
Joined: 21 Aug 2008
Total Posts: 2961
17 Jul 2011 05:11 PM
Probably because Vector3.new(door.Position + 0,0,-1) is screwed up.
Report Abuse
Camoy is not online. Camoy
Joined: 21 May 2009
Total Posts: 6207
17 Jul 2011 05:11 PM
You didn't use my edits!

script.Parent.ClickDetector.MouseClick:connect(function()
repeat wait() until door.Position == Vector3.new(62, 8.9, -22)
door.Position = door.Position + Vector3.new(0, 0, -1)
end)
Report Abuse
eXoguti093 is not online. eXoguti093
Joined: 17 Oct 2008
Total Posts: 1786
17 Jul 2011 05:13 PM
You didn't even put ClickDetector.MouseClick:connect .....
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