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

How do I find player through a script in a tool?

Asked by 10 years ago

If I have a script in a tool, how do I find who player is?

2 answers

Log in to vote
1
Answered by
Ekkoh 635 Moderation Voter
10 years ago

Or if it's a server script,

local player = Game:GetService("Players"):GetPlayerFromCharacter(Tool.Parent)
Ad
Log in to vote
1
Answered by 10 years ago

Use this:

local player = Players.LocalPlayer

that is how you locate it. Tools oftenly use localscript so use localscript to use the line above.

0
isn't it local player = game.Players.LocalPlayer fartlindyfart 0 — 7y

Answer this question