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

HealthBar is not a valid member of PlayerGui, but it is?

Asked by 8 years ago

Alright, so i was coding for this one script, saying to insert a BillboardGui into a ScreenGui, and apparently, it says this: However, in explorer, it's there.

Now, after putting a: script.Parent:WaitForChild("HealthBar"), nothing happens.

I know this isn't really scripting, but i need to make a folder-esc thing so i can organize names for a function in the script.

And for examples using this chunk of code, here's one:

function Checkingfunc(plr1)

    local GUIers = GetPlayersFromGui(plr1.PlayerGui.HealthBar:GetChildren())
    if GUIers ~= nil then
    for i, player in ipairs (game.Players:GetPlayers()) do
            local match = GUIers[player.Name]
            if not match then
                grabplayers()
            end
    end
    end
end

On a sidenote, i've tried using a Folder. The problem still persists. Also, the script is a LocalScript in PlayerGui.

1 answer

Log in to vote
0
Answered by 8 years ago

The HealthBar is stored in the CoreGui.

0
The HealthBar i'm referring to is an Instance created in PlayerGui. CrammelApple 50 — 8y
Ad

Answer this question