#how do i make the healthbar visible

57 messages · Page 1 of 1 (latest)

drowsy urchin
#

er

onyx sage
#

Eh

#

Aint it visible already

#

By default

cyan sage
#

What healthbar are we talking about?

onyx sage
#

Yea

#

@drowsy urchin ?

drowsy urchin
#

uh

#

the normal one

onyx sage
#

Uh like for players

drowsy urchin
#

yeah

#

hold on

onyx sage
#

Oh ok

#

I see what you mean

drowsy urchin
#

nvm

onyx sage
#

I think there's probably a property for that

drowsy urchin
#

what is it

#

and how do i find it/get it

onyx sage
#

AlwaysOn
When a humanoid's HealthDisplayType is set to HumanoidHealthDisplayType.AlwaysOn, its health bar always appears

#

From the docs

#

U gotta use the enum

#

So

#
Humanoid.HealthDistanceType = Enum.HumanoidHealthDisplayType.AlwaysOn
ripe basaltBOT
#

studio** You are now Level 8! **studio

drowsy urchin
#

cant i just change it to where its enabled

onyx sage
#

What do u think this does

#
local Players = game:GetService("Players")

local function onPlayerAdded(player)
    player.CharacterAdded:Connect(function(character)
        local humanoid = character:FindFirstChildOfClass("Humanoid")
        if humanoid then
            -- Give each humanoid full control over its name/health display distance
            humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.Subject
            -- Set name display distance to 20 studs
            humanoid.NameDisplayDistance = 20
            -- Set health bar display distance to 15 studs
            humanoid.HealthDisplayDistance = 15
            -- Only show health bar when humanoid is damaged
            humanoid.HealthDistanceType = Enum.HumanoidHealthDisplayType.DisplayWhenDamaged
        end
    end)
end

Players.PlayerAdded:Connect(onPlayerAdded)
#

Eg from the docs

drowsy urchin
#

is that a local script

onyx sage
#

It's a server script

drowsy urchin
#

oh

#

where do i put it

onyx sage
#

Server script service

#

But modify it to your liking

drowsy urchin
#

as a script

#

or loca

onyx sage
#

Server script

#

Not a local script

#

Server script

drowsy urchin
#

how do you get a server script

onyx sage
#

Wha-

drowsy urchin
#

ik whhere to put the script

onyx sage
#

It's just called script

drowsy urchin
#

im asking

onyx sage
#

Like the object is called script

drowsy urchin
#

is it named script or local script

#

mk

onyx sage
#

Script

#

Change display when damaged to always on btw

#

This is just an example from the docs

drowsy urchin
#

waot

#

wait

#

@onyx sage did i need to change NameDisplayDistance

onyx sage
#

No

#

You don't even really need that

#

It's just the display dist type