Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Event c1 doesn't connect once my character dies, what might be the problem?

Asked by 8 years ago
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
0
"disconnect() Can not be used anymore; prints an error message. Use RBXScriptConnection:disconnect() instead. Obsolete" Taken from wiki. http://wiki.roblox.com/index.php?title=RBXScriptSignal&redirect=no#Methods TheHospitalDev 1134 — 8y
0
Basically, "disconnect()" doesn't work TheHospitalDev 1134 — 8y

Answer this question