So I’m making a combat system (with swords).
My goal is to have the Enemy you hit show the clash effects via the tool they are holding.
local function sparks(Character)
for _, child in pairs(Character:GetChildren()) do
if child:IsA("Tool") then
for _, x in pairs(child.Model.HitboxReg.ClashEffects:GetChildren()) do
x.Enabled = true
wait(.1)
x.Enabled = false
end
end
end
end
This is my attempt. Code gives no error in output but doesn’t let me go past function when called.
What I’m doing is looking in the Character from “Humanoid.Parent” to get the Character of the Enemy. Then looking to look for the “Tool” they are holding. In the tool under a part, aka “HitboxReg”, holding data for the weapons (was made for easy use of finding certain things) I look for the ClashEffect attachment that holds 3 items. So I want to enable all 3 at the same time for “wait(.1)”