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: Question!

Previous Thread :: Next Thread 
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
25 Jul 2012 06:28 PM
How would i fetch my local player in a model then connect it to a gui.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
25 Jul 2012 06:29 PM
Not sure what you mean, through a Touched event, or just LocalPlayer?

† KMXD †
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
25 Jul 2012 06:39 PM
Just threw a local player
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
25 Jul 2012 06:56 PM
bump
Report Abuse
1MangoMan0 is not online. 1MangoMan0
Joined: 28 Sep 2010
Total Posts: 1596
25 Jul 2012 07:06 PM
I don't think you can fetch a local player in a model.
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
25 Jul 2012 08:26 PM
then they need to add that lol
Report Abuse
nightmare3o is not online. nightmare3o
Joined: 21 Jun 2008
Total Posts: 956
25 Jul 2012 08:43 PM
Wait you want to get a LocalPlayer from a Gui?
I don't understand.
Report Abuse
vampire2512 is not online. vampire2512
Joined: 29 Dec 2009
Total Posts: 323
25 Jul 2012 08:47 PM
You mean from a local script in a Gui? Just do LocalPlayer in the local script within the gui. =l

game.Players.LocalPlayer
Report Abuse
vampire2512 is not online. vampire2512
Joined: 29 Dec 2009
Total Posts: 323
25 Jul 2012 08:47 PM
Or just do the old fashioned Parent! =3
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
25 Jul 2012 09:19 PM
No i ment like get the game.Players:localplayer then it would find the stats and things its for a gui based tycoon im building
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
25 Jul 2012 09:20 PM
Well if you have the character, you can use the GetPlayerFromCharacter method.

† KMXD †
Report Abuse
1MangoMan0 is not online. 1MangoMan0
Joined: 28 Sep 2010
Total Posts: 1596
25 Jul 2012 09:20 PM
Where would the script be?
Report Abuse
1MangoMan0 is not online. 1MangoMan0
Joined: 28 Sep 2010
Total Posts: 1596
25 Jul 2012 09:21 PM
@knightmare
:O I didn't know that existed! I thought you could only get the character from the player.
Report Abuse
nightmare3o is not online. nightmare3o
Joined: 21 Jun 2008
Total Posts: 956
25 Jul 2012 09:21 PM
I'm good with GUIs but I'm still not sure what you are trying to look for.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
25 Jul 2012 09:22 PM
Well yeah. An example could be:

local Player = Game.Players:GetPlayerFromCharacter(character)

† KMXD †
Report Abuse
1MangoMan0 is not online. 1MangoMan0
Joined: 28 Sep 2010
Total Posts: 1596
25 Jul 2012 09:23 PM
Awesome.
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
25 Jul 2012 09:57 PM
How would you suppose I get player from character without having them hit somthing.
local g = game.Players:GetPlayerFromCharacter(hit.Parent)
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
25 Jul 2012 09:58 PM
You don't have to hit anything, if you have a player's character model, you put that in the method's argument (hit.Parent).

† KMXD †
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
25 Jul 2012 10:02 PM
so how would i change that line of the script to make it so it doesn't have to hit anything and just grabs the name.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
25 Jul 2012 10:05 PM
Where would the script be, in the character?

local Player = Game.Players:GetPlayerFromCharacter(script.Parent)

† KMXD †
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
25 Jul 2012 10:12 PM
No its in a model like im tring to just get the localplayers name without them doing anything. but from the model using that
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
25 Jul 2012 10:14 PM
How would you know which player to get? I'm not sure what you're trying to do...

† KMXD †
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