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: Trying to make hunger script.

Previous Thread :: Next Thread 
GalaxyFPS_Studios is not online. GalaxyFPS_Studios
Joined: 28 Apr 2017
Total Posts: 68
01 Oct 2017 11:13 PM
I have a small script and I dont know how to set a players health to 0

if
game.Players.LocalPlayer.leaderstats.Hunger.Value == 0 then
game.Players.LocalPlayer.Humanoid.Health = 0
end



help????
Report Abuse
Sukadia is online. Sukadia
Joined: 25 Jan 2013
Total Posts: 500
01 Oct 2017 11:15 PM
The player's HP is in workspace.

game.Workspace.LocalPlayer.Humanoid.Health = 0

Report Abuse
GalaxyFPS_Studios is not online. GalaxyFPS_Studios
Joined: 28 Apr 2017
Total Posts: 68
01 Oct 2017 11:22 PM
i couldnt get that to work :P
Report Abuse
NexanianStudios is online. NexanianStudios
Joined: 16 Jul 2016
Total Posts: 1109
01 Oct 2017 11:23 PM
Is it in a server script?
Report Abuse
GalaxyFPS_Studios is not online. GalaxyFPS_Studios
Joined: 28 Apr 2017
Total Posts: 68
01 Oct 2017 11:29 PM
no
Report Abuse
Sukadia is online. Sukadia
Joined: 25 Jan 2013
Total Posts: 500
01 Oct 2017 11:30 PM
LocalPlayer only works on local scripts. You're going to have to change it to that.

Report Abuse
NexanianStudios is online. NexanianStudios
Joined: 16 Jul 2016
Total Posts: 1109
01 Oct 2017 11:30 PM
Try adding a print right before the health setting line to see if it runs at all
Report Abuse
GalaxyFPS_Studios is not online. GalaxyFPS_Studios
Joined: 28 Apr 2017
Total Posts: 68
01 Oct 2017 11:34 PM
would i put the local script in starterpack/gui or in the workspace?
Report Abuse
NexanianStudios is online. NexanianStudios
Joined: 16 Jul 2016
Total Posts: 1109
01 Oct 2017 11:44 PM
LocalScripts have to be parented under the player or character
Report Abuse
nofascistsaloudxD is not online. nofascistsaloudxD
Joined: 02 Sep 2015
Total Posts: 408
02 Oct 2017 12:43 AM
game.Players.LocalPlayer.Character.Humanoid.Health = 0
Report Abuse
GalaxyFPS_Studios is not online. GalaxyFPS_Studios
Joined: 28 Apr 2017
Total Posts: 68
02 Oct 2017 08:13 PM
None of it worked :P i dont know what im doing wrong?!
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