Can someone help me out? idk what i did wrong
----- fireball script
local player = script.Parent.Parent
local mouse = player:GetMouse()
enabled = false
function onKeyDown(key)
key = key:lower()
if key == "f" and not enabled then --f for fireball
fireball = Instance.new("part")
fireball.Shape = "Ball"
fireball.BrickColor = BrickColor.new("Really red")
fireball.Transparency = 0.3
fireball.TopSurface = "Smooth"
fireball.BottomSurface = "Smooth"
fireball.CFrame = Player.Character.Torso.CFrame *CFrame.new(0,0,-5)
fireball.Parent = game.Workspace
local mesh = Instance.new("SpecialMesh",fireball)
mesh.MeshType = "Sphere"
local fire = Instance.new("fire",fireball)
fire.Heat = 8
fire.Size = 10
local bv = Instance.new("BodyVelocity")
bv.maxForce = Vector3.new(math.huge.math.huge.math.huge)
bv.velocity = player.Character.Torso.CFrame.lookVector*80
for i = 1,13 do
fireball.Mesh.Scale = fireball.Mesh.Scale +Vector3.new(0.1,0.1,0.1)
wait()
end
bv.Parent = fireball
fireball.CanCollide = false
end
end
mouse.KeyDown:connect(OnKeyDown)