|
| 27 Apr 2017 05:24 PM |
How can I define a "LocalPlayer" in a normal script.
I need a normal script becuz local dont work with my code. Code gets blocked by roblox so.
NORMAL SCRIPT
game.Players.LocalPlayer(Which I cant do in a script).Character.HumanoidRootPart |
|
|
| Report Abuse |
|
|
Y0_dude
|
  |
| Joined: 03 Aug 2016 |
| Total Posts: 113 |
|
|
| 27 Apr 2017 05:36 PM |
| Well, you can't do that since server scripts don't run locally in any specific player. You'd have to reference a specific player in order to that. |
|
|
| Report Abuse |
|
|
iSymon
|
  |
| Joined: 19 Nov 2011 |
| Total Posts: 1023 |
|
|
| 27 Apr 2017 05:40 PM |
You can't.
If the script is a descendant of the Player object, then just use script.Parent until it references the Player.
|
|
|
| Report Abuse |
|
|
|
| 27 Apr 2017 05:45 PM |
| try sending the localplayer via a remote event to the normal script |
|
|
| Report Abuse |
|
|
kazu212
|
  |
| Joined: 25 Jul 2014 |
| Total Posts: 134 |
|
| |
|
|
| 27 Apr 2017 05:57 PM |
Yeah you can't do that in a normal script, but you can get it from a PlayerAdded function or Remote Events/Remote Functions.
|
|
|
| Report Abuse |
|
|