| |
|
| |
|
nike6330
|
  |
| Joined: 11 Feb 2009 |
| Total Posts: 154 |
|
|
| 26 Sep 2011 11:08 AM |
Samples where to use, some cannons, auto humanoid walks etc.
How to use print(tostring(game.Workspace.Part.CFrame.lookVector))
You should use multiplication with Vector3, like
game.Workspace.Part.CFrame.lookVector * Vector3.new(10,10,10) And if you set BodyVelocity's velolcity to it parents lookvector multiplicated the part would move direction of the front face. |
|
|
| Report Abuse |
|
|
| |
|
nike6330
|
  |
| Joined: 11 Feb 2009 |
| Total Posts: 154 |
|
|
| 26 Sep 2011 11:15 AM |
Umm some thing like this
local Hitted=false speed = 15
script.Parent.Touched:connect(function(part) if part.Name == "Torso" then if Hitted == false then Hitted = true end end)
while true do if Hitted then script.Parent.BodyVelocity.velocity = Vector3.new(0,0,0) else script.Parent.BodyVelocity.velocity = script.Parent.CFrame.lookVector * Vector3.new(speed,speed,speed) end end |
|
|
| Report Abuse |
|
|
|
| 26 Sep 2011 12:19 PM |
| ^ script.Parent.CFrame.lookVector*speed would work just fine |
|
|
| Report Abuse |
|
|