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 » Scripting Helpers
Home Search
 

[ Content Deleted ]

Previous Thread :: Next Thread 
kingzluke is not online. kingzluke
Joined: 23 Mar 2009
Total Posts: 4177
16 Mar 2012 06:04 PM
If any leader stat goes below -10 it's suppose to kill the player.. but it doesn't.

game.Players.ChildAdded:connect(function(Incoming)
while true do
wait()
if Incoming.leaderstats.Sleep.Value=<=-10 then
pcall(function() Incoming.Character.Humanoid.Health=0
Incoming.leaderstates.Thirst.Value=0
Incoming.leaderstates.Sleep.Value=0
Incoming.leaderstates.Hunger.Value=0
end)
end
if Incoming.leaderstats.Hunger.Value=<=-10 then
pcall(function() Incoming.Character.Humanoid.Health=0
Incoming.leaderstates.Thirst.Value=0
Incoming.leaderstates.Sleep.Value=0
Incoming.leaderstates.Hunger.Value=0
end)
end
if Incoming.leaderstats.Thirst.Value=<=-10 then
pcall(function() Incoming.Character.Humanoid.Health=0
Incoming.leaderstates.Thirst.Value=0
Incoming.leaderstates.Sleep.Value=0
Incoming.leaderstates.Hunger.Value=0
end)
end
end
end)

I edited it from another script I had which was if leaderstats reached over 100 the player dies
Report Abuse
Woodstauk4 is not online. Woodstauk4
Joined: 27 Dec 2010
Total Posts: 3061
16 Mar 2012 06:07 PM
[ Content Deleted ]
Report Abuse
kingzluke is not online. kingzluke
Joined: 23 Mar 2009
Total Posts: 4177
16 Mar 2012 06:10 PM
... :l
Report Abuse
kingzluke is not online. kingzluke
Joined: 23 Mar 2009
Total Posts: 4177
16 Mar 2012 06:12 PM
Anyone able to halp?
Report Abuse
Woodstauk4 is not online. Woodstauk4
Joined: 27 Dec 2010
Total Posts: 3061
16 Mar 2012 06:13 PM
[ Content Deleted ]
Report Abuse
kingzluke is not online. kingzluke
Joined: 23 Mar 2009
Total Posts: 4177
16 Mar 2012 06:17 PM
@Wood

tried it as thirst, didn't work qq
Report Abuse
Woodstauk4 is not online. Woodstauk4
Joined: 27 Dec 2010
Total Posts: 3061
16 Mar 2012 06:18 PM
[ Content Deleted ]
Report Abuse
kingzluke is not online. kingzluke
Joined: 23 Mar 2009
Total Posts: 4177
16 Mar 2012 06:20 PM
@wood

I don't know what you're saying either.
Report Abuse
Woodstauk4 is not online. Woodstauk4
Joined: 27 Dec 2010
Total Posts: 3061
16 Mar 2012 06:21 PM
[ Content Deleted ]
Report Abuse
kingzluke is not online. kingzluke
Joined: 23 Mar 2009
Total Posts: 4177
16 Mar 2012 06:27 PM
@Wood

I tried that along with different kill methods but still didn't work. Thanks anyways :)
Report Abuse
Woodstauk4 is not online. Woodstauk4
Joined: 27 Dec 2010
Total Posts: 3061
16 Mar 2012 06:28 PM
[ Content Deleted ]
Report Abuse
kingzluke is not online. kingzluke
Joined: 23 Mar 2009
Total Posts: 4177
16 Mar 2012 06:32 PM
Nvm

I fixed it using my other script.

I removed the = and made it if it was -1 and now it kills them :D
Report Abuse
Silv3rStrik3r is not online. Silv3rStrik3r
Joined: 30 May 2011
Total Posts: 2197
16 Mar 2012 07:30 PM
@Kingz,
This is for a scoreboard right.
Report Abuse
Silv3rStrik3r is not online. Silv3rStrik3r
Joined: 30 May 2011
Total Posts: 2197
16 Mar 2012 07:31 PM
Once it hits zero make it kill them, Make it on a loop so onc they die it restarts.
Thank you,
Alex.
Report Abuse
kingzluke is not online. kingzluke
Joined: 23 Mar 2009
Total Posts: 4177
16 Mar 2012 07:33 PM
@Silv3r

I have a script which resets stats on death. Seeing as the leaderstats start as 0 I made it so anything below 0 would kill you and then it resets so players can continue.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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