heres the code calling the remote:
if config:FindFirstChild("ActiveSpell") then
local activeSpell = config:FindFirstChild("ActiveSpell") and config.ActiveSpell.Value or "Lightning"
local spellData = spellDataModule[activeSpell];
animateTowerEvent:FireAllClients(newTower, "Attack", activeSpell, target)
local castTime = ((spellData.CastTime or 1) - 0.5);
task.wait(castTime + spellEffects[activeSpell][2](newTower, target))
else
print("not existing")
animateTowerEvent:FireAllClients(newTower, "Attack", target)
end
heres the remote being called:
animateTowerEvent.OnClientEvent:Connect(function(tower, animName, spellEffectName, target)
playAnimation(tower, animName)
if target then
if tower.Config:FindFirstChild("ActiveSpell") then
fireSpell(tower, target, spellEffectName)
else
print("ay")
fireProjectile(tower, target)
tower.HumanoidRootPart.Attack:Play()
end
end
end)