so im making a game where it has some super powers like shooting fire balls and im having some problems with a hit function in the script. this is the hit part:
fireBall.Touched:Connect(function(hit)
if hit:IsDescendantOf(character) or hit:FindFirstChild("ParticleEmitter") then return end
if caster == player then
game.ReplicatedStorage.Events.FireBall:FireServer(hit)
end
end)
this fires when the fireball hits a player. i want the fireball to carry on and damage everyone it touches without spamming the damage
i dont want to destroy teh fireball when it touches a player so if there is a group of people i want it to damage all of them. right now whats happening is that when it touches a player it damages them multiple times by firing many remotes. how would i stop it from doing that?

3 comments
Try making a table of all the characters it hits and each time it damages if what it is damaging is on the table then it does nothing.
i get what you mean but i dont know how i would work with tables i havent really worked with them can you help me out?
CompUcomp and Brandon1881 both have the right answer, add a debounce system and make the event only for the humanoid root part. Incorporate both of these answers for the best script :)