Example:game.Players.LocalPlayer
Questions! What does LocalPlayer Do In a script? What Funtion Can This Make?
Example:game.Players.LocalPlayer
Questions! What does LocalPlayer Do In a script? What Funtion Can This Make?
LocalPlayer is the client's player. You can call clones and access the player's Backpack, StarterGear, and PlayerGui.
Here's the wiki article with more information on how to use it:
In a LocalScript, using the LocalPlayer property of the Players service will give you the player that has the script, which is the LocalPlayer. For example, in a LocalScript, if you have this code, then the player will be killed.
game.Players.LocalPlayer.Character.Humanoid.Health = 0 -- Notice how the 'LocalPlayer' property of the Players service is used.
Hope this helps!
Thank For Your Help!
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Thank For Your Help!
No problem! Make sure to accept the answer on the side! :)