Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 27 Apr 2013 09:30 AM |
My logic is once more not getting this:
local part = game.Workspace.Part1.BodyGyro script.Parent.Selected:connect(function(mouse) while not part do wait() end mouse.Move:connect(function() part.cframe = CFrame.new(part.Parent.Position, mouse.Hit.p) end) end)
So first question, so it rotates through the position of it?
And second question.Why is it a comma in CFrame.new()
Shouldnt it be pluss? since pluss pluss is like thing AND thing.And thats comma to?? |
|
|
| Report Abuse |
|
|
|
| 27 Apr 2013 09:55 AM |
"part.cframe = CFrame.new(part.Parent.Position, mouse.Hit.p)"
In this instance CFrame.new takes two arguments, a Vector3 position and a point to look at. The CFrame is at that position facing the mouse.Hit.p. |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 27 Apr 2013 10:09 AM |
| So, bodygyro needs two arguments for CFrame.new? |
|
|
| Report Abuse |
|
|
|
| 27 Apr 2013 10:17 AM |
@Fedorakid
Doesn't need, no. Just explaining why there were 2 arguments to CFrame.new() in that case. |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
| |
|