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

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

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

The HealthBar is stored in the CoreGui.

1 comment

0

The HealthBar i'm referring to is an Instance created in PlayerGui.

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