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
 

Re: Infinite health script

Previous Thread :: Next Thread 
Polleoh is not online. Polleoh
Joined: 20 Apr 2013
Total Posts: 435
01 May 2014 01:18 PM
I want to make a script that gives everyone infinite health for a certain amount of time. I made a script but it only works for one person not everyone. Can someone help me?

while true do
script.Parent.Polleoh.Humanoid.MaxHealth = 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
wait(1)
end

Report Abuse
Polleoh is not online. Polleoh
Joined: 20 Apr 2013
Total Posts: 435
01 May 2014 01:21 PM
Also, im very new to scripts.
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
01 May 2014 01:23 PM
replace 100000... with math.huge

Also, use :GetPlayers ()
http://wiki.roblox.com/index.php?title=GetPlayers_(Method)
Report Abuse
Polleoh is not online. Polleoh
Joined: 20 Apr 2013
Total Posts: 435
01 May 2014 01:26 PM
Ohh, thnx.
Report Abuse
nathan121215 is not online. nathan121215
Joined: 01 Dec 2008
Total Posts: 31
01 May 2014 01:48 PM
for _, player in pairs(game.Players:GetPlayers()) do
if player.Character then
player.Character.Humanoid.Health = 999e999
end
end

or use math.huge, either way works.
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
01 May 2014 01:54 PM
while wait() do
if game.Players:FindFirstChild("Polleoh") ~= nil then
game.Players:FindFirstChild("Polleoh").Character.Health = math.huge
end
end
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
01 May 2014 01:55 PM
"999e999"
what the heck lol
Report Abuse
Polleoh is not online. Polleoh
Joined: 20 Apr 2013
Total Posts: 435
01 May 2014 02:14 PM
Wait... so would this work? =


local joe = game.Players:getChildren() --players
local wepwnz = 30 -- I was told to put this here.. what is this for?
while true do

wait(1) --wait so we don't crash the server
wepwnz = wepwnz + 1-- add a second

function bobzor()
c = #joe do
joe[c].Character.Humanoid.Health = math.huge --gives them infinite health
wepwnz = 0
end end

if wepwnz >= 184 then -- i was told this makes it so that the script will happen again after 184
bobzor()
end
end
Report Abuse
brinkokevin is not online. brinkokevin
Joined: 25 Jul 2012
Total Posts: 1673
01 May 2014 02:24 PM
that will work but weard i guess you dont want that you want this

while wait(1)do
for i,v in pairs(game.Players:GetChildren())do
if v.Character and v.Character:FindFirstChild("Humanoid")then
v.Character.Humanoid.Health = math.huge
end
end
end
Report Abuse
Polleoh is not online. Polleoh
Joined: 20 Apr 2013
Total Posts: 435
01 May 2014 02:33 PM
weard?
Report Abuse
Polleoh is not online. Polleoh
Joined: 20 Apr 2013
Total Posts: 435
01 May 2014 02:35 PM
everyone's telling me how to do the immortality script.. but not the time script..
Report Abuse
Polleoh is not online. Polleoh
Joined: 20 Apr 2013
Total Posts: 435
02 May 2014 02:13 AM
so can someone help me with that?
Report Abuse
brinkokevin is not online. brinkokevin
Joined: 25 Jul 2012
Total Posts: 1673
02 May 2014 02:14 AM
while wait(1)do
for i,v in pairs(game.Players:GetChildren())do
if v.Character and v.Character:FindFirstChild("Humanoid")then
v.Character.Humanoid.Health = math.huge
end
end
end


-_-
Report Abuse
Polleoh is not online. Polleoh
Joined: 20 Apr 2013
Total Posts: 435
02 May 2014 02:16 AM
brink, does that script give you infinite life and then after 30 seconds your health will return to the default amount of health?
Report Abuse
DerProgrammierer is not online. DerProgrammierer
Joined: 16 Aug 2007
Total Posts: 12992
02 May 2014 02:20 AM
" "999e999"
what the heck lol"

999e999 = 999 x 10^999
Report Abuse
xXxMoNkEyMaNxXx is not online. xXxMoNkEyMaNxXx
Joined: 03 Oct 2008
Total Posts: 3120
02 May 2014 02:25 AM
Lua does hex too:
0xBEEF
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