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 » Scripters
Home Search
 

How do I make an NPC face something?

Previous Thread :: Next Thread 
RoCkEr285 is not online. RoCkEr285
Joined: 18 Apr 2012
Total Posts: 1898
19 Oct 2015 02:10 AM
I have already tried using a body gyro, by the way.
Report Abuse
gooey333 is not online. gooey333
Joined: 24 Mar 2013
Total Posts: 1208
19 Oct 2015 02:19 AM
Watch this and learn from the master!

http://www.roblox.com/games/273604267/Romeo-and-Juliet-Act-III-Scene-I-For-School
Report Abuse
gooey333 is not online. gooey333
Joined: 24 Mar 2013
Total Posts: 1208
19 Oct 2015 02:20 AM
It is all NPC
Report Abuse
RoCkEr285 is not online. RoCkEr285
Joined: 18 Apr 2012
Total Posts: 1898
19 Oct 2015 02:26 AM
NPC.Torso.BodyGyro.cframe = CFrame.new(NPC.Torso.Position, game.Workspace.Part1.Position)

It is not working.. Help?
Report Abuse
FlyNormal is not online. FlyNormal
Joined: 30 Sep 2015
Total Posts: 344
19 Oct 2015 03:04 AM
The BodyGyro's properties: MaxTorque, D, and P play role in how the BodyGyro will behave.

bodyGyro.MaxTorque = Vector3.new(1, 1, 1) * 1e99 -- this should be high so it actually rotates the part
bodyGyro.P = 1000 -- some power


Also if you want to continuously change the NPC BodyGyro to point to the part. Use while loop.

while true do
NPC.Torso.BodyGyro.cframe = CFrame.new(NPC.Torso.Position, game.Workspace.Part1.Position)
wait()
end

Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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