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
|
  |
| Joined: 20 Apr 2013 |
| Total Posts: 435 |
|
|
| 01 May 2014 01:21 PM |
| Also, im very new to scripts. |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 20 Apr 2013 |
| Total Posts: 435 |
|
| |
|
|
| 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 |
|
|
|
| 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
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 01 May 2014 01:55 PM |
"999e999" what the heck lol |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| Joined: 20 Apr 2013 |
| Total Posts: 435 |
|
| |
|
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
|
  |
| Joined: 20 Apr 2013 |
| Total Posts: 435 |
|
|
| 02 May 2014 02:13 AM |
| so can someone help me with that? |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 02 May 2014 02:20 AM |
" "999e999" what the heck lol"
999e999 = 999 x 10^999 |
|
|
| Report Abuse |
|
|
| |
|