Basically when I point my cursor at the sky the fireball just goes in the opposite direction of where it’s supposed to go. It just goes the reverse way instead of the correct way.
local mouse = GetMouse:InvokeClient(Player)
if mouse and mouse.Position then
local Fireball = Assets.Fireball:Clone()
local lookAt = CFrame.lookAt(Character.PrimaryPart.Position, mouse.Position)
Fireball.CFrame = lookAt
local Params = RaycastParams.new()
Params.FilterDescendantsInstances = {Character, workspace.VFX}
Params.FilterType = Enum.RaycastFilterType.Blacklist
local cast = workspace:Raycast(mouse.Position, lookAt.LookVector*1000, Params)
if cast and cast.Instance and cast.Position then
lookAt = CFrame.lookAt(Fireball.Position, cast.Position)
print("???")
end
Fireball.CFrame = lookAt
local VectorForce = Instance.new("VectorForce")
VectorForce.Enabled = true
VectorForce.Force = gravityVector * Fireball.AssemblyMass
VectorForce.Attachment0 = Fireball.PrimaryAtt
VectorForce.Parent = Fireball
Fireball.Parent = workspace.VFX
end