#Make the reset button set you to 1 health

1 messages · Page 1 of 1 (latest)

worthy imp
#

This probably sounds like a weird question but is there a way to make it so the inbuilt roblox reset button sets you to 1 health instead of kills you? I have like a downed system that triggers when you hit 1 health but the roblox reset button completely bugs it because it sets the player to 0 health which in my code will reset your "medical state". Was wondering if anyone had any ideas on how to solve this by like editing the button or something

verbal pike
chrome schooner
#

-- LocalScript inside StarterPlayerScripts

local StarterGui = game:GetService("StarterGui")
local Players = game:GetService("Players")
local player = Players.LocalPlayer

-- Replace Roblox's default reset behavior
StarterGui:SetCore("ResetButtonCallback", function()
local char = player.Character
local humanoid = char and char:FindFirstChildOfClass("Humanoid")

if humanoid then
    -- Force health to 1 instead of killing
    humanoid.Health = 1

    -- Example: directly trigger your "downed" logic here if needed
    local downed = char:FindFirstChild("Downed")
    if downed and downed:IsA("BindableEvent") then
        downed:Fire()
    end
end

end)

verbal pike
#

that changes the default behaviour of the reset button into whatever function you give it

chrome schooner
#

free labor ig

worthy imp
#

Thank you guys 🙏 im gonna give it a try in a min

chrome schooner
#

k

verbal pike