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 » Club Houses » Let's Make a Deal
Home Search
 

Re: scripting question

Previous Thread :: Next Thread 
SnowyKirby is not online. SnowyKirby
Joined: 15 Jan 2013
Total Posts: 68009
03 Apr 2015 09:58 AM
how do i get a player from clickdetector
Report Abuse
Widths is not online. Widths
Joined: 12 Aug 2014
Total Posts: 41286
03 Apr 2015 09:58 AM
A player who is clicked, or the clicker?
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
03 Apr 2015 09:59 AM
ClickDetector.MouseClick:connect(function(plr)
print(plr.Name)
end)


squrdwurd da magical shaggy ( ͠° ͟ʖ ͡°)
Report Abuse
Widths is not online. Widths
Joined: 12 Aug 2014
Total Posts: 41286
03 Apr 2015 10:00 AM
local obj = Instance.new("Part", workspace)
local click = Instance.new("ClickDetector", obj)

click.MouseClick:connect(function(player)
console.log(player.Name..' clicked the part')
end)
Report Abuse
slxr is not online. slxr
Joined: 27 Jan 2012
Total Posts: 1075
03 Apr 2015 10:00 AM
function onClick(playerwhoclicked)

end

script.Parent.ClickDetector.MouseClick:connect(onClick)
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
03 Apr 2015 10:01 AM
console.log in ROBLOX? daym!!


squrdwurd da magical shaggy ( ͠° ͟ʖ ͡°)
Report Abuse
SnowyKirby is not online. SnowyKirby
Joined: 15 Jan 2013
Total Posts: 68009
03 Apr 2015 10:02 AM
ty baheeg
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
03 Apr 2015 10:03 AM
yw
You can use the parameter/Variable "plr" to do other stuff with it


squrdwurd da magical shaggy ( ͠° ͟ʖ ͡°)
Report Abuse
SnowyKirby is not online. SnowyKirby
Joined: 15 Jan 2013
Total Posts: 68009
03 Apr 2015 10:04 AM
ok
Report Abuse
Widths is not online. Widths
Joined: 12 Aug 2014
Total Posts: 41286
03 Apr 2015 10:05 AM
o sory lol was thinking js

change that to print mb
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Club Houses » Let's Make a Deal
   
 
   
  • 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