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: Touched and Clicked

Previous Thread :: Next Thread 
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
21 Mar 2013 01:35 PM
is it possible to change a script from Touched to Clicked Only Changing the function and call line.

example:


function Touched()
if a == b then
a = c
end
end
script.Parent.Touched:connect(Touched)

------------------------------------------------------------------------------

function Clicked()
if a == b then
a = c
end
end
script.Parent.ClickDetector.Clicked:connect(Clicked)
Report Abuse
Zulsoras is not online. Zulsoras
Joined: 10 Sep 2008
Total Posts: 963
21 Mar 2013 02:20 PM
If you are asking if that script would work as a touched or a clicked then it depends on what script. Technically it could but you would need to add a click detector
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
21 Mar 2013 02:22 PM
if i use ClickDetector then:

1) whats the call line got to be ?

2) is it possible to track the clicker
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
21 Mar 2013 02:27 PM
and can you run a normal debounce with clicks
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
21 Mar 2013 02:38 PM
The event would be .MouseClick. The parameter would be the "clicker" (Player).

(╯°□°)> KMXD
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
21 Mar 2013 02:39 PM


    function Clicked( Clicker )
      print( Clicker.Name )
    end
    
    script.Parent.ClickDetector.MouseClick:connect(Clicked)

(╯°□°)> KMXD
Report Abuse
HaxHelper is not online. HaxHelper
Joined: 19 Dec 2009
Total Posts: 1208
21 Mar 2013 02:40 PM
Wait, we can actually get the player who clicked now?
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
21 Mar 2013 02:42 PM
Yes, since at least a year ago.

(╯°□°)> KMXD
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
22 Mar 2013 02:16 AM
script.Parent.Buy.ClickDetector.MouseClick:connect(function (h)
if (not h.Parent:findFirstChild("Humanoid")) then return; end
local plr = game.Players:findFirstChild(h.Parent.Name);
if (not plr) then return; end


This is part of a script that worked fine with touch but doesnt work with click

any ideas?
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
22 Mar 2013 02:54 AM
BUMP
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
22 Mar 2013 06:44 AM
the MouseClick event returns the PLAYER who clicked it, not the character.
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