|
| 18 Jun 2013 03:50 AM |
I know I can use local h = script.Parent:FindFirstChild("Humanoid") for the starting of a follow script but what do I put in the ROBLOX body form.
The reason why I am asking this is because I want to make a zombie. My OWN zombie, not a free-modeled one. I mean, if you suggest me to insert a free model and check how they set it up, I can but I want to be able to script it. |
|
|
| Report Abuse |
|
|
|
| 18 Jun 2013 03:56 AM |
Of course, won't forget the kill script:
function onTouched() local h = part.Parent:FindFirstChild("Humanoid") if h~= nil then h.Health = 0 end
part.Parent:connect(onTouched) |
|
|
| Report Abuse |
|
|
Infocus
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 8022 |
|
|
| 18 Jun 2013 04:01 AM |
| I would personally use MoveTo if a humanoid is nearby |
|
|
| Report Abuse |
|
|
|
| 18 Jun 2013 04:20 AM |
So would these two scripts work?
1. local h = part.Parent:FindFirstChild("Humanoid") --Finds the object to follow. local RP = Instance.new("RocketPropulsion") --Inserts RocketPropulsion RP.Parent = h --Moves object to Humanoid RP.MaxSpeed = 20 --45 is the set speed RP.Target = workspace.Target --What it will follow RP:fire() --Moves towards set target wait(5) --Waits 5 seconds RP:abort() --Stops the RocketPropulsion==
2. if script.Parent.Humanoid.Health == 0 then local regen = script.Parent:clone() script.Parent.Position = Velocity3.new(0, 0, 0) end
BTW, 2 is a regen script...
|
|
|
| Report Abuse |
|
|
|
| 18 Jun 2013 04:45 AM |
| Nvm, I'll use a free model. I'm not that advanced at scripting, I mean, I'm only a beginner.. |
|
|
| Report Abuse |
|
|