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

Disabling Reset Character from Menu

Asked by 10 years ago

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?

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. XanthicDragon 38 — 10y
0
Nope. Why not just change the name of the Humanoid? trogyssy 221 — 10y

3 answers

Log in to vote
0
Answered by
RubenKan 3615 Moderation Voter Administrator Community Moderator
10 years ago

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()

Ad
Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

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)
0
You may also rename the humanoid, but that will break most of your scripts. Inventfvl 21 — 5y
Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

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.

Answer this question