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

How can I get a player's character?

Asked by
VFXed 0
10 years ago

I want to make a tool that adds an explosion to the player's torso when a tool is clicked. However, I can't get the character. Help! D:

0
To get player's character, you can use "game.Players.PlayerAdded:connect(function(char)". I am not sure if it is spelled "Player" or ''Players", try the 2. kudorey619 138 — 10y

2 answers

Log in to vote
0
Answered by 10 years ago

Use LocalPlayer: game.Players.LocalPlayer Remember that this can only be used in LOCALSCRIPTS

Ad
Log in to vote
-1
Answered by 10 years ago

game.Player.Character.Torso:explode()

Answer this question