I’m currently making a character shoot out a fireball, and everything is working except the fireball is going into the same direction every time, as shown in the video here:
fireballa:Play()
local NearestPlayer = GetNearestPlayer()
if NearestPlayer == nil then continue end
Model:SetPrimaryPartCFrame(CFrame.new(Model.PrimaryPart.Position, NearestPlayer.Character.PrimaryPart.Position))
wait(2)
local fireballCopy = fireball:Clone()
local spawnPoint = boss.shootfire
local speed = 250
fireballCopy.Position = spawnPoint.Position
fireballCopy.Parent = game.Workspace
fireballCopy.Velocity = fireballCopy.CFrame.LookVector * speed
That’s because the fireball you are copying is always going to be facing the same direction. So when you are using lookVector it will always be the same as the templates direction.
That shouldn’t impact this at all. You are just changing the direction of Velocity based off the direction the variable ‘Model’ was set to face. I am assuming that Model is equal to the boss thing that turns to face the player.