BillboardGui is disabled while it shouldnt

I’ve been making a system for showing player’s stats while hovering over them. Whole system is located locally and Gui is cloned from replicated storage. Issue is that this gui isnt working properly and enabled state seems to have no deal with it. When I’m parenting Gui manually its works fine but not tho script.

And I have no idea why it doesnt work

Gui properties

image

Script part responsible for changing ui
blink = RS.Other["173vis"]:Clone()
spawn(function() while true do
		task.wait()
		local a,b = pcall(function()
			blink.Meters.Position = UDim2.fromOffset(mouse.X,mouse.Y)
			if targ then
				blink.Parent = targ.Head
				blink.Enabled = true
				Highlight.Parent = targ
				Highlight.Enabled = true
				for i,v in pairs(blink.Meters.Blink.Meter:GetChildren()) do
					if v.ClassName == "ImageLabel" then
						--print(tonumber(v.Name) > targ.Blink.Value)
						if tonumber(v.Name) > targ.Blink.Value then
							v.Visible = false
						else
							v.Visible = true
						end
					end
				end
			else
				blink.Enabled = true
				Highlight.Enabled = false
			end
		end)
		if not a then print(a,b) end	
	end
end)

It’ll be because you haven’t set the adornee of the GUI to a part.

This type of GUI displays relative to the position of a part. Changing the adornee changed the placement of the GUI.

See more here: BillboardGui.

1 Like

I’ve actually did at first version of that script, removed since I tho it caused behavior like that

Also

image

Hm, with that in mind, have you tried debugging your both of your equality checks with print statements to see if ImageLabel is being found and that the number it’s being compared to is what it needs to be?

Yes, as I said before Its worked with parenting manually to something, also I simplified code so there is only operations over BillboardGui is left. About print statements I’ve made sure that whole code runs without any error, even adding pcall to catch errors that heppens before loading game (even tho its localscript)

Found out that issue was in a single line of code that came from previous version. I should really learn to read some day
This one if be exactly

		blink.Meters.Position = UDim2.fromOffset(mouse.X,mouse.Y)