I Want To Make The Menu Not Show And Also Let People Not Reset.
There is.
People say that the ROBLOX reset button is Lua coded and it looks for through your character until it finds your Humanoid and then basically sets your Health to 0, essentially killing you!
To remove resetting, change the name of the humanoid to something else and you shouldn't be able to reset!
Example Code That You Can Use
game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(c) c:WaitForChild("Humanoid").Name = "BlahBlah" end) end)
WARNING: doing this breaks tools and scripts that are not properly coded to handle this.
Ex. Sword scripts, scripts that deal damage to humanoid, most / any tool or script that are not scripted according to this change.
To fix this is really simple. Just have your scripts look for whatever you changed your Humanoid's name to. In this case, "FalseHumanoid"
Put this in a regular script and put it in wherever you put you scripts. (ServerScriptService or Workspace).
Hope this helped! If so, please accept?
As of November 7, there is now a proper way to disable or customize the behavior of the main menu's reset button.
Setting "ResetButtonCallback"
to false
will disable the reset button, which will then appear grayed out.
game:GetService("StarterGui"):SetCore("ResetButtonCallback", false)
While unrelated to the question, I'd like to point out that it is also possible to set "ResetButtonCallback"
to a BindableEvent object to disable the default reset button behavior and instead implement your own.
local resetEvent = Instance.new("BindableEvent") -- Once the reset button is clicked, our 'resetEvent' BindableEvent will fire, -- and all the functions 'connect()'ed to it will be called. resetEvent:Connect(function() print("Someone tried to reset!") end) game:GetService("StarterGui"):SetCore("ResetButtonCallback", resetEvent)
You can't make the menu not show, but you can change the name of the humanoid OR counter the health changing to 0. As a localscript in StarterGui this has always worked for me:
local Humanoid = workspace:FindFirstChild(game.Players.LocalPlayer.Name).Humanoid Humanoid.HealthChanged:connect(function(health) Humanoid.Health = 100 end)