Is there an alternative to using localplayer without using touched/hit function?
✓ ANSWER ACCEPTED
Is there an alternative to using LocalPlayer in a localscript?
1 answer
✓ Accepted answer
Well if the script is a child direct child of the player then just use
local player = script.parent
but if it is let's say in a tool that is a direct child of the player then use
local player = script.parent.parent
And so on and so on, that makes it where you can just use the keyword "player" to refer to the player that the script is running for. Hope that helped
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Doesn't make any sense, why are you trying to get the player in a local script without game.Players.LocalPlayer?
You have to explain more what you are thinking? A touched/hit function? Do you mean connecting to the Touched event for BaseParts?