Hello I’ve been trying to make a fireball attack that comes out from the player if they click a tool, but the fireball keeps on colliding with the character and im using overlaspe param to blacklist the character that shoots it from getting hit, but it still collides with the player even though I put their character in the blacklist.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local runservice = game:GetService("RunService")
local debris = game:GetService("Debris")
ReplicatedStorage.remotes.FireAttack.OnServerEvent:Connect(function(player, mouseHit)
local character = player.Character
local fireballop = OverlapParams.new()
fireballop.FilterType = Enum.RaycastFilterType.Blacklist
fireballop.FilterDescendantsInstances = {workspace.ignore, character} -- this is the main problem right here.
local fireball = ReplicatedStorage.FireAttack.fireball:Clone()
fireball.Parent = workspace.ignore
fireball.CFrame = character.HumanoidRootPart.CFrame
local connection
local starttime = os.clock()
local hit = false
connection = runservice.Heartbeat:Connect(function(dt)
local hitParts = workspace:GetPartsInPart(fireball,fireballop)
if #hitParts == 0 and hit == false then
hit = true
local explosion = ReplicatedStorage.FireAttack.explode:Clone()
explosion.Parent = workspace.ignore
explosion.CFrame = fireball.CFrame
for i,v in explosion.Attachment:GetChildren() do
v:Emit(v:GetAttribute("EmitCount"))
end
debris:AddItem(explosion,2)
end
if hit == true then
connection:Disconnect()
for i,v in fireball.Attachment:GetChildren() do
v.Enabled = false
end
debris:AddItem(fireball,3)
end
fireball.CFrame = CFrame.new(fireball.Position) + mouseHit.LookVector * dt * 60
if os.clock() >= starttime+4 then
connection:Disconnect()
for i,v in fireball.Attachment:GetChildren() do
v.Enabled = false
end
debris:AddItem(fireball,3)
return
end
end)
end)```