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 » Game Design
Home Search
 

Re: Which BodyForce should be used for NPC's?

Previous Thread :: Next Thread 
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
23 Mar 2016 03:38 PM
I've never really used BodyForce's before. I want to make an NPC look in the direction of your character, but not the rotation. For example, if you were in a valley below the NPC, it would look in your direction, but still be standing up straight and looking straight forward.

Which bodyforce should I be using?
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
23 Mar 2016 04:30 PM
I tried using BodyAngularVelocity in the torso but it didn't move the NPC at all.
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
23 Mar 2016 06:37 PM
I just want the NPC's torso to face my character.
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
23 Mar 2016 10:02 PM
Let me sum it up better:

Only rotate NPC's Torso in one axis, to face your direction. How would I do this?
Report Abuse
ProjectSlayer is not online. ProjectSlayer
Joined: 04 Oct 2012
Total Posts: 10148
23 Mar 2016 10:16 PM
Google 'BodyGyro roblox wiki'.
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
23 Mar 2016 10:35 PM
I had this script:
-- Inside the NPC. Character is the NPC's character
-- Target is your player
while wait(0.2) do
Character.Torso.BodyGyro.CFrame = Target.Torso.CFrame
end

It created weird effects and didn't work. I've never used BodyGyro before so it's new to me. Here's the settings for bodygyro in the torso:

D: 0
MaxTorque: 0, 400000, 0
P: -10000
Report Abuse
ProjectSlayer is not online. ProjectSlayer
Joined: 04 Oct 2012
Total Posts: 10148
23 Mar 2016 11:11 PM
local part1 = game.Workspace.Part1 -- The part that will turn to face Part2
local part2 = game.Workspace.Part2
part1.BodyGyro.cframe = CFrame.new(part1.Position, part2.Position)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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