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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: how to get someone's player/character from a surfacegui

Previous Thread :: Next Thread 
Eclipsin is not online. Eclipsin
Joined: 09 Feb 2012
Total Posts: 5197
03 Sep 2014 08:08 PM
trying to get a player/character (either one, doesn't matter) when a surfacegui's textbutton is clicked

how would i go about doing that, since i can't use a localscript

function onClick()


-- no idea what to do here



end

script.Parent.MouseButton1Click:connect(onClick)
Report Abuse
CLIMAXIMUS is not online. CLIMAXIMUS
Joined: 22 Jun 2012
Total Posts: 1738
03 Sep 2014 08:10 PM
function onClick(plr)
print(plr.Name)
print("nob")
end

script.Parent.MouseButton1Down:connect(onClick)
Report Abuse
Eclipsin is not online. Eclipsin
Joined: 09 Feb 2012
Total Posts: 5197
03 Sep 2014 08:11 PM
"21:11:41.757 - Workspace.Part.SurfaceGui.Frame.TextButton.Script:3: attempt to index local 'plr' (a number value)"

-{E_
Report Abuse
CLIMAXIMUS is not online. CLIMAXIMUS
Joined: 22 Jun 2012
Total Posts: 1738
03 Sep 2014 08:14 PM
i tralld u
local scripts are only way
nob
Report Abuse
Eclipsin is not online. Eclipsin
Joined: 09 Feb 2012
Total Posts: 5197
03 Sep 2014 08:14 PM
such noob

-{E_
Report Abuse
CLIMAXIMUS is not online. CLIMAXIMUS
Joined: 22 Jun 2012
Total Posts: 1738
03 Sep 2014 08:21 PM
says the nob that does 'MouseButton1Click'
stfu
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