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

How do you keep a Billboardgui from scaling in size, as you walk close or away ?

Everytime I get close to an NPC with a billboardgui, the gui gets smaller as a approach. What am I doing wrong?

I'm using this:

	local frame = game.ServerStorage.MoodFrame:Clone()
	
	local gui = Instance.new("BillboardGui")
		gui.Parent=npc.Head
		gui.Adornee=npc.Head
		gui.Size=UDim2.new(1,0,1,0)
		gui.StudsOffset=Vector3.new(0,2,0) 
		frame.Parent = gui

Size of the MoodFrame (which I just converted to an Image label) is {0,23},{0,23}

5 comments

0

This is happening because you're using the scale property of the billboardgui size which point is exactly this.

0

it's normal i believe

0

Actually I set scale to 1 and it still changes.. everyone in forum comments says, "use scale to 1 to be 100% of your screen, and that fixes it... I think its broke...

0

I've tried it WITHOUT the scale and it still scales.... very frustrating...

0

Please no comments or answers unless you have a true tested answer. I'm not looking for suggestions at this point, because I've done lots of research.

1 answer

You cant use an offset in the UDim2. The offset resizes, but not the scale.

Don't know what offset is?

The offset is the second number that is shown in the UDim2. Let's say you have this UDim2: {0,1},{2,3} In this UDim2 the 1 and the 3 are both offsets, while the 0 and the 2 are not. I hope this helped.

4 comments

0

A bit hard to understand, but if you need help, just comment and I will try to explain better.

0

Nope doesn't help. Try it yourself and you'll see that doesn't work.

0

I know all about offset and scale - works great in a regular GUI. Billboardgui is completley different . Try it.... If you get some code working I'd love to see it. What I want is the imagelable I put in the GUI to be SMALL as the player is far in the distance, and a I get closer to the player it gets proportionally bigger (like it should - I'm getting closer). Instead,Roblox has this set opp

0

I will try, but it will take a lot of time, as I dont know quite how to check a player's distance from something

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