generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Define localplayer in a normal script.

Previous Thread :: Next Thread 
Dumbfounded_Goose is not online. Dumbfounded_Goose
Joined: 25 Dec 2011
Total Posts: 53
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 is not online. 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 is not online. 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
Festivereinhard2 is not online. Festivereinhard2
Joined: 08 Dec 2015
Total Posts: 587
27 Apr 2017 05:45 PM
try sending the localplayer via a remote event to the normal script
Report Abuse
kazu212 is not online. kazu212
Joined: 25 Jul 2014
Total Posts: 134
27 Apr 2017 05:45 PM
KeyDown is depricated
Report Abuse
SpeakerColonia is not online. SpeakerColonia
Joined: 11 Jul 2012
Total Posts: 10238
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image