Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Disabling Reset Character from Menu

Is there a way of disabling the "Reset Character" from the client menu?

Here is the code that is used in the actual client menu and as you can see, depends on finding a Humanoid in order to reset:

function resetLocalCharacter()
local player = game.Players.LocalPlayer
if player then
if player.Character and player.Character:FindFirstChild("Humanoid") then
player.Character.Humanoid.Health = 0
end
end
end

Is there any way to do this without changing the name of the Humanoid?

2 comments

1

I have never really considered doing this in my entire scripting experience, but last I checked the menu can not be changed as itself.

0

Nope. Why not just change the name of the Humanoid?

3 answers

This is NOT posible without changing the name of Humanoid, you can however just un-capitalise the H in Humanoid to make it humanoid, then most tools wont break becouse they use :lower()

This is possible using a SetCore method.

There are 2 possible ways to prevent people from resetting.

  1. (Simply blurs out the reset button.)
game:GetService("StarterGui"):SetCore("ResetButtonCallback", false)
  1. (When the player confirms they want to reset, the default reset button behavior is removed and fires resetBindable instead.)
local resetBindable = Instance.new("BindableEvent")
resetBindable.Event:connect(function()
    -- Implement what happens when the player confirms they want to reset.
end)

-- This will remove the current behavior for when the reset button 
-- is pressed and just fire resetBindable instead.
game:GetService("StarterGui"):SetCore("ResetButtonCallback", resetBindable)

1 comment

0

You may also rename the humanoid, but that will break most of your scripts.

In StarterGui, add a LocalScript. Paste this into the LocalScript:

local StarterGui = game:GetService('StarterGui')

StarterGui:SetCore ("ResetButtonCallback",false)

After you've pasted, it should be complete.

This discussion is preserved as it was. New answers, comments, and votes are closed.