What do you want to achieve? I want to create a fireball, where it shoots out from your HumanoidRootPart, specifically wherever it’s looking. I was going to accomplish this using lookVector.
What solutions have you tried so far? I’ve tried using Vector3’s instead, but that doesn’t work. I’ve searched up this on different websites, including this, and couldn’t find my answer there…
local char = player.Character
local humRP = char:WaitForChild("HumanoidRootPart")
local cf = humRP.CFrame
FBall.Anchored = true
FBall.CanCollide = true
FBall.Parent = workspace
FBall.CFrame = cf.lookVector
If you want it to have velocity and go in a specific direction, I would recommend trying out something like this (you can use body movers as well if you want):
FBall.Velocity = cf.lookVector * 200 --Whatever velocity you want
As for setting the initial CFrame, you could put it just ahead of the root part if you want. Just play around with it and see what you like. Hope this helps
It’s because lookVector returns a Vector3 value when it’s not multiplied by anything. lookVector returns the forward direction of a CFrame’s orientation, not a full CFrame. Try multiplying lookVector as @lifacy suggested!
Part.
First of all lookVector does not return a CFrame. It returns a Vector3 Value.
To solve this, you could do
FBall.CFrame = CFrame.new(cf.lookVector) --According to wiki,
--this part creates a CFrame from a Vector3 value,
--And so you can easily set the part's CFrame.
Well in this part I also noticed something but I am not too sure.
You want to ‘shoot’ something but, it seems like you’re just setting the CFrame of the part to target place. I recommend you to use BodyVelocity for this. (Or tweening?)
Well, I hope I could solve your problem!