Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Any way to address a player's character besides the following methods?

Asked by 8 years ago
Edited 8 years ago

Besides: FindFirstChild, LocalPlayer, Script.Parent(x amount of times), Plr?

If so, please tell me every method that you know.

1 answer

Log in to vote
2
Answered by 8 years ago

Getting the Player

It doesn't really matter how you define the player. In a LocalScript, LocalPlayer is the best method. There's so reason to use anything else to define the Local Player in a LocalScript. In a regular script, you can get Player's from the PlayerAdded event, or if you somehow get the character of a Player you can use GetPlayerFromCharacter.

There are tons of ways to get the Player in a LocalScript, but it's best to use LocalPlayer, so there's no use in telling you other methods.

Getting the Character

If you already have the player, getting the character is as simple as player.Character. If you're using a touched event, there are always methods for getting the Character, and checking for a Character.

Good Luck!

Ad

Answer this question