SubeteJoin Date: 2011-07-10 Post Count: 917 |
It positions the brick correctly, but doesn't rotate it correctly :/
local sp = script.Parent
local aimpart = script.Parent.Parent.Torso
while wait() do
sp.CFrame = CFrame.new(aimpart.CFrame.p + Vector3.new(0,3,0)) * CFrame.new(aimpart.CFrame.lookVector)
end |
|
SubeteJoin Date: 2011-07-10 Post Count: 917 |
b |
|
SubeteJoin Date: 2011-07-10 Post Count: 917 |
b2 |
|
SubeteJoin Date: 2011-07-10 Post Count: 917 |
b3 |
|
SubeteJoin Date: 2011-07-10 Post Count: 917 |
b4 |
|
SubeteJoin Date: 2011-07-10 Post Count: 917 |
b5 |
|
SubeteJoin Date: 2011-07-10 Post Count: 917 |
b6 |
|
Roblok1Join Date: 2011-07-27 Post Count: 2019 |
Now you're just spamming.
|
|
SubeteJoin Date: 2011-07-10 Post Count: 917 |
Think what you will, but I still have an issue that I can't fix. |
|
Roblok1Join Date: 2011-07-27 Post Count: 2019 |
Ok here is what I would do. Usaly when you CFrame a part, it's rotation is changed too. So try CFraming the player's torso to an invisible brick with the right rotation. Or just weld their torso to the brick instead.
I'm not too sure though. |
|
Roblok1Join Date: 2011-07-27 Post Count: 2019 |
I could be compleatily off topic. Who knows. More loops. Just call me NOOB! |
|
SubeteJoin Date: 2011-07-10 Post Count: 917 |
Welding it glitches the NPCs movements, and the rotation of the brick (as far as I know..) is defined by the * CFrame.new(aimpart.CFrame.lookVector)
The * is supposed to add rotation to the position value, which is the first part of it.
But I apparently did something wrong :/ |
|
murcury57Join Date: 2010-06-30 Post Count: 90299 |
[ Content Deleted ] |
|
|
Try using CFrame.Angles(IDKwhat.CFrame.lookVector) |
|
SubeteJoin Date: 2011-07-10 Post Count: 917 |
I fixed it by doing
CFrame.new((aimpart.CFrame.p + aimpart.CFrame.lookVector).p + CFrame.new(0,0,3).p) |
|