I just made my fireball, and while play testing it instead of shooting straight forward it just tumbles down. How do I make it so instead of it shooting downwards, it goes completely straight?
(Script)
local fireball = game:GetService(“ServerStorage”):WaitForChild(“Fireball”)
local fireballSpeed = 100
local fireballLifetime = 5
local fireballDamage = 45
local cooldown = 3
local canshoot = true
script.Parent.Fire.OnServerEvent:Connect(function(player)
if not canshoot then return end
canshoot = false
local root = player.Character.HumanoidRootPart
local bv = Instance.new("BodyVelocity")
bv.MaxForce = Vector3.new(1,1,1) * 3000
bv.Velocity = root.CFrame.lookVector * fireballSpeed
local fb = fireball:Clone()
fb.Parent = game.Workspace
fb.CFrame = root.CFrame
bv.Parent = fb
game.Debris:AddItem(fb, fireballLifetime)
fb.Touched:Connect(function(hit)
if hit.Parent.Name == player.Name then return end
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Humanoid.Health -= fireballDamage
end
end)
wait(cooldown)
canshoot = true
end)