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: How can I construct a ROBLOX body with a follow script?

Previous Thread :: Next Thread 
AtlanticBlox is not online. AtlanticBlox
Joined: 12 Jun 2013
Total Posts: 5136
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
AtlanticBlox is not online. AtlanticBlox
Joined: 12 Jun 2013
Total Posts: 5136
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 is not online. 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
AtlanticBlox is not online. AtlanticBlox
Joined: 12 Jun 2013
Total Posts: 5136
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
AtlanticBlox is not online. AtlanticBlox
Joined: 12 Jun 2013
Total Posts: 5136
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
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