|
| 08 Jun 2014 12:13 PM |
I wanted to make a zombie that picks a random amount of health that it will have, so I made a script for that, but it doesn't do anything. Here is the script: Person = Script.Parent
while true do randomnumber = math.random(100,500) randomnumber2 = math.random(100,499) Person.Zombie.MaxHealth = randomnumber wait(1) Person.Zombie.Health = randomnumber2 end |
|
|
| Report Abuse |
|
|
| |
|
|
| 10 Jun 2014 03:10 PM |
| Bump! Bumpitty bumpitty bump! |
|
|
| Report Abuse |
|
|
|
| 10 Jun 2014 03:12 PM |
local humanoid = -- Define this
humanoid.MaxHealth = math.random(100, 200) humanoid.Health = humanoid.MaxHealth |
|
|
| Report Abuse |
|
|
| |
|
|
| 10 Jun 2014 04:05 PM |
You know the zombie will insta heal every second...
Also you don't capitalize the S on script. :P --try this put it into the humanoid
wait(1.5) script.Parent.MaxHealth = math.random(100,500) script.Parent.Health = math.random(100,500) |
|
|
| Report Abuse |
|
|
|
| 10 Jun 2014 04:35 PM |
I tried that. No errors, but it did not work.
|
|
|
| Report Abuse |
|
|
|
| 12 Jun 2014 02:59 PM |
| BUUUUUUUMMMMMMMMMMMPPPPPPPPPPPPPP! |
|
|
| Report Abuse |
|
|
|
| 12 Jun 2014 03:19 PM |
while true do randomnumber2 = math.random(100,499) Person.Zombie.MaxHealth = (math.random(100,500),math.random(100,500),math.random(100,500)) wait(1) Person.Zombie.Health = (math.random(100,499),math.random(100,499),math.random(100,499)) end |
|
|
| Report Abuse |
|
|
|
| 12 Jun 2014 03:19 PM |
while true do Person.Zombie.MaxHealth = (math.random(100,500),math.random(100,500),math.random(100,500)) wait(1) Person.Zombie.Health = (math.random(100,499),math.random(100,499),math.random(100,499)) end
THIS SHOULD WORK! |
|
|
| Report Abuse |
|
|
|
| 13 Jun 2014 06:11 AM |
| I have not tried that yet, but why does it seem like that is a troll? |
|
|
| Report Abuse |
|
|
|
| 13 Jun 2014 11:55 AM |
| ...? Maybe cause you don't know how to script? |
|
|
| Report Abuse |
|
|
|
| 13 Jun 2014 02:30 PM |
| I CAN script, not very well, but I can. I've made all sorts of things like brick eating bricks, bombs, and more. |
|
|
| Report Abuse |
|
|
|
| 13 Jun 2014 02:33 PM |
| Basically you can't script. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
|
| 13 Jun 2014 06:21 PM |
while true do Person.Zombie.MaxHealth = (math.random(100,500)) wait(1) Person.Zombie.Health = (math.random(100,499)) end
There even shorter |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2014 06:23 PM |
That did not work. Is it even possible to do this?
|
|
|
| Report Abuse |
|
|
|
| 19 Jun 2014 06:24 PM |
| Remove the while true do and the end :P |
|
|
| Report Abuse |
|
|
| |
|
Vuva
|
  |
| Joined: 22 Jan 2010 |
| Total Posts: 1102 |
|
|
| 21 Jun 2014 05:28 PM |
Workspace - ZombieModel - . . . - Script - Humanoid - . . .
Script: Zombie=script.Parent Min=100 Max=500 Zombie.Humanoid.MaxHealth=Max while wait() do Zombie.Humanoid.Health=math.random(Min,Max) end |
|
|
| Report Abuse |
|
|
|
| 22 Jun 2014 08:16 PM |
| I actually thought that might work, unlike the other ones, but apparently it still won't work. Now I'm almost convinced that this is impossible. |
|
|
| Report Abuse |
|
|
Vuva
|
  |
| Joined: 22 Jan 2010 |
| Total Posts: 1102 |
|
|
| 22 Jun 2014 11:04 PM |
If you recreated the scenario exactly as I listed it should have worked. Because I just now recreated it based on what I said and it worked. I guess I should also mention that there should be a part named "Head" inside of the ZombieModel so that you can actually see the healthbar. Maybe I just didn't interpret what you wanted correctly though... |
|
|
| Report Abuse |
|
|
|
| 22 Jun 2014 11:52 PM |
randomnumber = math.random(100,500) randomnumber2 = math.random(100,499) Person.Zombie.Humanoid.MaxHealth = randomnumber wait(1) Person.Zombie.Health = randomnumber2 |
|
|
| Report Abuse |
|
|