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

How do I make sure that players can't see other players/NPC's health bars?

I know that it's something that belongs in a local script, and if I'm wrong please tell me otherwise. What would I put in a local script that disables the ability for players to see other player's health bar?

Picture of what I mean if you're confused: http://prntscr.com/m0sknp

1 comment

0

look in the humanoids settings

1 answer

✓ Accepted answer

use a localscript and put

local rs = game:GetService("RunService") 
rs.RenderStepped:Connect(function()
	for i,v in ipairs(workspace:GetChildren()) do
		if v:IsA("Model") and v:FindFirstChildOfClass("Humanoid") then
			v:FindFirstChildOfClass("Humanoid").HealthDisplayDistance = Enum.HumanoidHealthDisplayType.AlwaysOff
		end
	end
end)

3 comments

0

Works perfectly, thank you.

0

yw

0

-1 for not explaining.

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