Event c1 doesn't connect once my character dies, what might be the problem?
function fStateIdle()
if lhumanoid then
if lhumanoid:GetState() == Enum.HumanoidStateType.Freefall then
info.state = "Falling"
elseif info.state == "Fighting" or (info.state == "Dead" and lhumanoid.Health > 0) then
info.state = "Walking"
if shiftDown then
setSprint(true)
end
else
info.state = "Walking"
end
setAnimation(0.25*((swordData.aMultiplier+swordData.aMultiplier)/2),info.fState,swordData.moveSet.idle)
local c1
c1 = mouseEvent.Changed:connect(function()
if mouseDown[2] then
c1:disconnect()
fStateBToHold()
elseif mouseDown[1] then
c1:disconnect()
fStateAToHold()
end
end)
deathConnection = lcharacter.Humanoid.Died:connect(function()
c1:disconnect()
deathConnection:disconnect()
end)
end
end