menu
Roblox Forum Archive
Home
User Search
Forums
Donate
search
settings
Home
User Search
Forums
Donate
launch
Go to User Dashboard
Forums
Scripters
Trying to make hunger script.
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right
Trying to make hunger script.
GalaxyFPS_Studios
Join Date: 2017-04-28
Post Count: 68
#225872233
Monday, October 02, 2017 4:13 AM GMT
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????
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
Sukadia
Join Date: 2013-01-25
Post Count: 500
#225872298
Monday, October 02, 2017 4:15 AM GMT
The player's HP is in workspace. game.Workspace.LocalPlayer.Humanoid.Health = 0
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
GalaxyFPS_Studios
Join Date: 2017-04-28
Post Count: 68
#225872464
Monday, October 02, 2017 4:22 AM GMT
i couldnt get that to work :P
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
NexanianStudios
Join Date: 2016-07-16
Post Count: 1109
#225872507
Monday, October 02, 2017 4:23 AM GMT
Is it in a server script?
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
GalaxyFPS_Studios
Join Date: 2017-04-28
Post Count: 68
#225872663
Monday, October 02, 2017 4:29 AM GMT
no
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
Sukadia
Join Date: 2013-01-25
Post Count: 500
#225872697
Monday, October 02, 2017 4:30 AM GMT
LocalPlayer only works on local scripts. You're going to have to change it to that.
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
NexanianStudios
Join Date: 2016-07-16
Post Count: 1109
#225872713
Monday, October 02, 2017 4:30 AM GMT
Try adding a print right before the health setting line to see if it runs at all
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
GalaxyFPS_Studios
Join Date: 2017-04-28
Post Count: 68
#225872825
Monday, October 02, 2017 4:34 AM GMT
would i put the local script in starterpack/gui or in the workspace?
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
NexanianStudios
Join Date: 2016-07-16
Post Count: 1109
#225873064
Monday, October 02, 2017 4:44 AM GMT
LocalScripts have to be parented under the player or character
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
nofascistsaloudxD
Join Date: 2015-09-02
Post Count: 408
#225874432
Monday, October 02, 2017 5:43 AM GMT
game.Players.LocalPlayer.Character.Humanoid.Health = 0
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
GalaxyFPS_Studios
Join Date: 2017-04-28
Post Count: 68
#225907828
Tuesday, October 03, 2017 1:13 AM GMT
None of it worked :P i dont know what im doing wrong?!
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right