|
| 02 Mar 2017 07:28 PM |
If i wanted to make a script that made a stalker NPC circle the player at a given distance forever, how would i make it happen? Would i use: #code math.sin() or #code math.cos()
2,908,999 Mouse clicks currently counted! |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 02 Mar 2017 07:29 PM |
You don't need to use trig., just use CFrame.Angles and let Roblox do all the work internally.
local dist = 100 NPC.CFrame = CFrame.new(torso.Position) * CFrame.Angles(0, tick(), 0) * CFrame.new(0, 0, dist) |
|
|
| Report Abuse |
|
|
|
| 03 Mar 2017 06:37 PM |
#code hum.WalkToPoint = char.HumanoidRootPart.CFrame.rightVector char.UpperTorso.CFrame = CFrame.new(char.UpperTorso.Position, Vector3.new(pos.X,char.UpperTorso.Position.Y,pos.Z))
This is making the NPC jump around. What should i do?
3,286,910 Mouse clicks currently counted! |
|
|
| Report Abuse |
|
|