I have a local script and a script and a remote event for the fireball, I have no problems except I have no clue at all to make it so that the caster of the fireball doesn't get damaged by the fireball.
Script in ServerScriptService:
game:GetService("ReplicatedStorage").RemoteEvent.OnServerEvent:Connect(function(plr)
local fireball = game:GetService("Lighting").FireBending.Fire1
local char = plr.Character
local fire = fireball:Clone()
fire.Parent = workspace
fire.CFrame = char.Humanoid.Torso.CFrame * CFrame.new(0,0,-10)
local bodyv = Instance.new("BodyVelocity")
bodyv.MaxForce = Vector3.new(1e8,1e8,1e8)
bodyv.Velocity = char.Humanoid.Torso.CFrame.lookVector * 150
bodyv.Parent = fire
local fireanim1 = char.Humanoid:LoadAnimation(script.FireAnim1)
local fireanim2 = char.Humanoid:LoadAnimation(script.FireAnim2)
local fireanim3 = char.Humanoid:LoadAnimation(script.FireAnim3)
local choose = math.random(1,3)
if choose == 1 then
fireanim1:Play()
elseif choose == 2 then
fireanim2:Play()
elseif choose == 3 then
fireanim3:Play()
end
wait(2)
fire:Destroy()
end)
And the LocalScript in the player's backpack:
local UserInputService = game:GetService("UserInputService")
local plr = game:GetService("Players").LocalPlayer
local mouse = plr:GetMouse()
local char = plr.Character or plr.CharacterAdded:wait()
local fireball = game:GetService("Lighting"):WaitForChild("FireBending").Fire1
local canattack = true
local checkdeath = true
UserInputService.InputBegan:Connect(function(input, gameProcessedEvent)
if input.KeyCode == Enum.KeyCode.Z and canattack == true and not gameProcessedEvent then
game:GetService("ReplicatedStorage").RemoteEvent:FireServer()
canattack = false
wait(3)
canattack = true
end
end)

3 comments
Spawn the fireball a little farther away from player?
So basically, just check if the parent name of the hit is not the player's name.
when spawning the fireball, add a stringvalue under the fireball that lists the player who cast it as its value, the damage script should then check that the person it touched doesn't have a name matching the tag