jbjgang2
|
  |
| Joined: 07 Feb 2010 |
| Total Posts: 8948 |
|
| |
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 26 Sep 2015 06:06 PM |
uh. indexing the character property?
-=Robo=- |
|
|
| Report Abuse |
|
|
|
| 26 Sep 2015 06:06 PM |
| uh. indexing the character property? [2] |
|
|
| Report Abuse |
|
|
jbjgang2
|
  |
| Joined: 07 Feb 2010 |
| Total Posts: 8948 |
|
| |
|
|
| 26 Sep 2015 06:29 PM |
local player = game.Players.LocalPlayer local character = player.Character
im confused if this is what you want?
Deaths, Forum Helper |
|
|
| Report Abuse |
|
|
|
| 26 Sep 2015 06:37 PM |
>in a local script uh. indexing the character property? [3] |
|
|
| Report Abuse |
|
|
jbjgang2
|
  |
| Joined: 07 Feb 2010 |
| Total Posts: 8948 |
|
|
| 27 Sep 2015 09:44 AM |
thats not the most effective way
it would error if the character hasn't been created |
|
|
| Report Abuse |
|
|
|
| 27 Sep 2015 09:45 AM |
local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:wait();
Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784 |
|
|
| Report Abuse |
|
|
notfruit
|
  |
| Joined: 21 Sep 2012 |
| Total Posts: 1386 |
|
|
| 27 Sep 2015 09:46 AM |
game.Players.PlayerAdded:connect(function (player) player:CharacterAdded:connect(function (character) -- do whatever you want with the character -- this is literally on the wiki end) end) |
|
|
| Report Abuse |
|
|
notfruit
|
  |
| Joined: 21 Sep 2012 |
| Total Posts: 1386 |
|
|
| 27 Sep 2015 09:46 AM |
| Oops, sorry. Didn't see the LocalPlayer. |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 27 Sep 2015 01:48 PM |
no, it wouldn't. if you index character and character is nil, it will read nil, it won't throw an error; character isn't a child, it's a property. hurr durr.
-=Robo=- |
|
|
| Report Abuse |
|
|
iWindowz
|
  |
| Joined: 05 Jan 2013 |
| Total Posts: 1809 |
|
|
| 27 Sep 2015 02:02 PM |
game.Players.LocalPlayer:WaitForChild("Character")? o.e
i wrote this siggy just because i dont have a siggy |
|
|
| Report Abuse |
|
|
iWindowz
|
  |
| Joined: 05 Jan 2013 |
| Total Posts: 1809 |
|
|
| 27 Sep 2015 02:02 PM |
^nvm that it isn't an object i am so stupid ;c
i wrote this siggy just because i dont have a siggy |
|
|
| Report Abuse |
|
|
|
| 27 Sep 2015 02:12 PM |
| game.Players.LocalPlayer.Character? |
|
|
| Report Abuse |
|
|
|
| 27 Sep 2015 03:33 PM |
| What's the point of posting unsure answers if I posted the answer already. :P |
|
|
| Report Abuse |
|
|