What I’m currently doing is creating some parts at the Mouse.Hit
position, but I want the parts to be oriented by the character position, not the camera. Video:
How do I fix it?
What I’m currently doing is creating some parts at the Mouse.Hit
position, but I want the parts to be oriented by the character position, not the camera. Video:
Part.Position = mouse.Hit.Position
Part.Orientation = Character.HumanoidRootPart.Orientation
No, as that would rotate the part by the HumanoidRootPart
. I want to rotate the part by the character position. (Part’s back should face the character)
Can you give a more detailed explanation on what you’re trying to achieve?
Do CFrame.lookat(mouse.Hit.Position,char.HumanoidRootPart.Position)
part.CFrame = CFrame.new(Player.Character.HumanoidRootPart.Position, Mouse.Hit.Position) * CFrame.new(0, 0, -part.Size.Z/2)
try that
That doesn’t create the part where my mouse 3D position is.
Part.CFrame = CFrame.lookat(mouse.Hit.Position,char.HumanoidRootPart.Position)
hmm maybe this tho first one was made for big parts tho part.CFrame = CFrame.new(Player.Character.HumanoidRootPart.Position, Mouse.Hit.Position)
That does the same behavior.
To the torso or the head of the player?
HumanoidRootPart. Neither animateable parts.
the one i sent is working pretty well for me i used it for a kamehameha skill
Then you are trying to do this
CFrame.lookat(mouse.Hit.Position,char.HumanoidRootPart.Position)
try to use this.
Getting the error attempt to call a nil value
.
TargetPart.CFrame = CFrame.lookat(MouseHit.Position,Character.HumanoidRootPart.Position)
TargetPart.CFrame = TargetPart.CFrame * CFrame.lookAt(MouseHit.Position,Character.HumanoidRootPart.Position)
maybe this ?
I get the same error.
maybe try add a position line after make it facing with character ?