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 |
|
|
|
| 25 Jul 2012 06:29 PM |
Not sure what you mean, through a Touched event, or just LocalPlayer?
† KMXD † |
|
|
| Report Abuse |
|
|
enyahs7
|
  |
| Joined: 25 Apr 2008 |
| Total Posts: 9820 |
|
| |
|
enyahs7
|
  |
| Joined: 25 Apr 2008 |
| Total Posts: 9820 |
|
| |
|
|
| 25 Jul 2012 07:06 PM |
| I don't think you can fetch a local player in a model. |
|
|
| Report Abuse |
|
|
enyahs7
|
  |
| Joined: 25 Apr 2008 |
| Total Posts: 9820 |
|
|
| 25 Jul 2012 08:26 PM |
| then they need to add that lol |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2012 08:43 PM |
Wait you want to get a LocalPlayer from a Gui? I don't understand. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 25 Jul 2012 08:47 PM |
| Or just do the old fashioned Parent! =3 |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 25 Jul 2012 09:20 PM |
Well if you have the character, you can use the GetPlayerFromCharacter method.
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2012 09:20 PM |
| Where would the script be? |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 25 Jul 2012 09:22 PM |
Well yeah. An example could be:
local Player = Game.Players:GetPlayerFromCharacter(character)
† KMXD † |
|
|
| Report Abuse |
|
|
| |
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|