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

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

Asked by 5 years ago

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

0
look in the humanoids settings DinozCreates 1070 — 5y

1 answer

Log in to vote
-1
Answered by
Imperialy 149
5 years ago

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)
0
Works perfectly, thank you. Incinerxte 2 — 5y
0
yw Imperialy 149 — 5y
0
-1 for not explaining. User#24403 69 — 5y
Ad

Answer this question