I am trying to fire a projectile from the character’s tool. I tried using TweenService to fire it from the tool to where the projectile is facing when it’s spawned, but it doesn’t work. It only works if I make the range a really big number.
local tween = ts:Create(
proj,
tweenInfo,
{Position = proj.CFrame.LookVector * range}
)
tween:Play()
The projectile is definitely looking towards the correct direction but it doesn’t tween towards it and I am not sure why
Don’t use tween for projectiles. use
while true do,
CFrame.lookAt(),
EXAMPLE:
while true do
projectile.CFrame = CFrame.lookAt(projectile.Position - direction) * 2 -- fire rate
task.wait()
end
I am not able to create a full on projectile for u.
xendatro
(xendatro)
June 15, 2022, 9:17pm
#3
Your end position does not take into account the original position of the projectile.
Try something like this:
Position = proj.CFrame:ToWorldSpace(CFrame.new(proj.CFrame.LookVector * range)).p
1 Like
GFink
(GFink)
June 15, 2022, 10:47pm
#4
{Position = proj.Position + proj.CFrame.LookVector * range}