The script is:
game.ReplicatedStorage.Event.SwordAttacked.OnServerEvent:connect(function(Player, Equip)
print("Trying to punch but there is nothing wrong")
local Char = Player.Character
local Swords = game.ServerStorage:FindFirstChild(Player.Name):WaitForChild("SwordSlot").Value
local animTrackAttack = Char.Humanoid:LoadAnimation(Player.Backpack:FindFirstChild(Swords.."Equip").Precise_Config.SlashAnim)
animTrackAttack:Play()
for i,v in pairs(Char:FindFirstChild("AttackSword"):GetChildren()) do
if v.Name == "Blade" then
v.Touched:connect(function(hit)
if hit.Parent:findFirstChild("Life") then
hit.Parent:findFirstChild("Life"):TakeDamage(tonumber(game.ReplicatedStorage.ItemDrop:FindFirstChild(game.ServerStorage:FindFirstChild(Player.Name):WaitForChild("SwordSlot").Value).Damage.Value))
end
end)
end
end
wait(animTrackAttack.Length)
for i,v in pairs(Char:FindFirstChild("AttackSword"):GetChildren()) do
if v.Name == "Blade" then
v.Touched:Disconnect()
end
end
end)
the error is 01:01:31.560 - Disconnect is not a valid member of RBXScriptSignal 01:01:31.560 - Stack Begin 01:01:31.561 - Script 'Workspace.FuncEvent.SwordFunction', Line 19 01:01:31.561 - Stack End
