Hello, im doing a Script Builder script and im doing a anti death, but im using a bindable event to call the script function again, but the bindable event is not fired, the anti death works but the bindable doesn't, i put a warn() in the start of startIt() but nothing, also it has a fake events script inside the startIt function

local bindEvent = Instance.new("BindableEvent")
function AntiDeath(pp)

 local CharacterCloned = pp.Character
    local noAction = false
    local lastPos = nil
    local bindaEvent = Instance.new("BindableEvent")
    pp.Character.Archivable = true
    CharacterCloned = CharacterCloned:Clone()
    for i,v in pairs(CharacterCloned:GetDescendants()) do
        if v:IsA("LocalScript") or v:IsA("Script") then
            v.Disabled = true
        end
    end
    EvEnt.Event:Connect(function()
        noAction = true
    end)
warn("a")
    coroutine.resume(coroutine.create(function()
        while wait(0.1) do
        if pp.Character  and not noAction then
            local torso  = nil
            if pp.Character:FindFirstChild("Torso") then
                torso = pp.Character:FindFirstChild("Torso")
            elseif pp.Character:FindFirstChild("UpperTorso") then
                torso = pp.Character:FindFirstChild("UpperTorso")
            end
            if torso then
                lastPos = torso.Position
	
            end
        end
        end
    end))
pp.Character:FindFirstChildOfClass("Humanoid").Died:Connect(function()
        if not noAction then
        noAction = true
   
            pp.Character = nil
            local NewCharacter = CharacterCloned:Clone()
           
            NewCharacter.Parent = workspace
            NewCharacter:MakeJoints()
           
            pp.Character = NewCharacter
            local torso  = nil
            if pp.Character:FindFirstChild("Torso") then
                torso = pp.Character.Torso
            elseif pp.Character:FindFirstChild("UpperTorso") then
                torso = pp.Character.UpperTorso
            end
            if torso then
                torso.CFrame = CFrame.new(lastPos)
            end
       FixTheCam()
        bindEvent:Fire()
            for i,v in pairs(NewCharacter:GetDescendants()) do
        if v:IsA("LocalScript") or v:IsA("Script") then
            v.Disabled = false
        end
            end
            noAction = false
            CallTwo()
        end
       
    end)
end

AntiDeath(owner)
startIt() -- this calls the script, not adding it since i dont want the source to be open for everyone
bindEvent.Event:Connect(function()
warn("death")
startIt()
end)

3 comments

0

also no errors drop

0

Can you not just parent the humanoid to the Terrain and you wouldn't die?

0

uhh, i would die anyways, the character needs the humanoid