|
| 01 Jan 2014 09:57 PM |
So, I have two really nooby questions...
First, is walk speed a measure of studs moved every seconds or what?
Second, if I want a humanoid to walk in a circle, I would need something like this:
local x,y = 0,0 Radius = 5
while LoopYolo do Hum:MoveTo(Vector3.new(math.sin(x)*Radius,0,math.cos(y)*Radius) end
Right? |
|
|
| Report Abuse |
|
|
Saiose
|
  |
| Joined: 06 Sep 2013 |
| Total Posts: 5759 |
|
|
| 01 Jan 2014 10:00 PM |
First question, yes.
Second question, I think idc |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2014 10:18 PM |
| Thanks. I'm about to text the second part. |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2014 10:33 PM |
This worked:
local c = 0 local Radius = 50 while true do wait(.5) script.Parent.Humanoid:MoveTo(Vector3.new(math.sin(c)*Radius,0,math.cos(c)*Radius),game.Workspace.BasePlate) print(math.sin(c)*Radius .. ":" .. math.cos(c)*Radius) c = c + math.pi*.1 end
|
|
|
| Report Abuse |
|
|
noah98
|
  |
| Joined: 12 Jan 2008 |
| Total Posts: 55 |
|
|
| 01 Jan 2014 10:35 PM |
| tell him to stop if he's human it should work |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2014 10:41 PM |
while wait(0.05) do for i = 1,360 do wait(0.05) Pos = CFrame.new(0,0,0)*CFrame.Angles(0,math.rad(i),0) *CFrame.new(0,0,30) -- Replace 30 with the distance u want them to walk around script.Parent:MoveTo(Pos.p,Workspace.Baseplate) end end |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2014 11:12 PM |
You could use quarterions (spelling?)
People sometimes use those (though rarely in place of RocketPropulsion) to make orbits |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 02 Jan 2014 12:30 AM |
Well normally, every point on a circle is cos, sin but since it's a complete circle, using sin, cos actually doesn't matter.
Just keep that in mind if future scripts using sin and cos may not work |
|
|
| Report Abuse |
|
|