Im new to lua and im not sure exactly how i could add fire to this fireball script.
game.Workspace.Fired.OnServerEvent:Connect(function(Player, Debounce)
local AlreadyTouched = false
local Character = Player.Character or Player.CharacterAdded:wait()
Debounce = true
local Fireball = Instance.new("Part")
Fireball.Name = "Fireball"
Fireball.Shape = Enum.PartType.Ball
Fireball.Size = Vector3.new(3,3,3)
Fireball.Material = Enum.Material.Neon
Fireball.BrickColor = BrickColor.new("Deep orange")
Fireball.CanCollide = false
Fireball.Parent = Character
Fireball.CFrame = Character.HumanoidRootPart.CFrame*CFrame.new(0,1,-6)
local BV = Instance.new("BodyVelocity")
BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
BV.Velocity = Character.HumanoidRootPart.CFrame.lookVector*100
BV.Parent = Fireball
Fireball.Touched:Connect(function(Hit)
local Humanoid = Hit.Parent:FindFirstChild("Humanoid")
if Humanoid == nil then return end
if AlreadyTouched == false then
AlreadyTouched = true
if Humanoid.Parent == Character then
Humanoid.Health = Humanoid.Health - 0
else
Humanoid.Health = Humanoid.Health - Humanoid.MaxHealth/4
end
end
end)
wait(2)
Fireball:Destroy()
Debounce = false
end)

3 comments
Thanks, i appreciate it
You don't need Fire.Parent = Fireball, just do this, local Fire = Instance.new("Fire", Fireball), I commonly use this for ParticleEmitters too.
See my comment for incapaz's answer. @cherrythetree