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
 

Problem with Click Function

Previous Thread :: Next Thread 
MrIntuitive is not online. MrIntuitive
Joined: 30 Aug 2012
Total Posts: 849
08 Sep 2012 08:30 AM
It's the last line, where you bind the click function and click detector triggers to your function, and I forget how to write it. I tried it four different ways, none of which worked. I do have a clickdetector in the object, I didn't forget that.

Here are the 4 different ways I tried it, each with their respective outputs:


script.Parent.ClickDetector.Clicked:connect(gamestartup)
OUTPUT:Clicked is not a valid member of ClickDetector

script.Parent.ClickDetector.Click:connect(gamestartup)
OUTPUT:Click is not a valid member of ClickDetector

script.Parent.Clicked.ClickDetector:connect(gamestartup)
OUTPUT:Clicked is not a valid member of Part

script.Parent.Click.ClickDetector:connect(gamestartup)
OUTPUT:Click is not a valid member of Part


(gamestartup is the name of my function)

-MrIntuitive
Report Abuse
velibor is not online. velibor
Joined: 24 Nov 2009
Total Posts: 1003
08 Sep 2012 08:32 AM
Workspace.Part.ClickDetector.MouseClick:connect(function(playerWhoClicked)
print("Part was clicked by: " .. playerWhoClicked.Name)
end

Velibor
Report Abuse
MrIntuitive is not online. MrIntuitive
Joined: 30 Aug 2012
Total Posts: 849
08 Sep 2012 08:34 AM
MOUSECLICK

That was it!


Thank you for your help

It worked
-MrIntuitive
Report Abuse
velibor is not online. velibor
Joined: 24 Nov 2009
Total Posts: 1003
08 Sep 2012 08:38 AM
No problem ;-)

Thread status : Closed

Velibor
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