Constantly teleport part above NPC

In my game, I have a NPC that walks around. I want a overhead GUI above that NPC to look at the player. The only problem is that The GUI is always a bit behind the NPC.

The GUI is on a part. The part is using Cframe.lookat(). I have tried welding the part to the HumanoidRootPart, but the whole NPC just looks at me. Any ideas?

1 Like

i would suggest using BillboardGuis parented to the NPC

2 Likes

just put the gui in the head, or humanoidrootpart?

1 Like

Then wouldn’t the head rotate to look at the player?

1 Like

I tried that, but I couldn’t find a way to stop the GUI from getting larger. I wanted the GUI to look smaller the farther away I go.

1 Like

You would use a BillboardGui for this;

You would also need to lock it’s size by restraining it’s scale, you can learn about that here!

Okay, That works. But…

The black TextLabel has Size being offset. The yellow TextLabel has Size being scale.

How would I fix that?

Change its size to {4,0,1,0} and its textlabel to {1,0,1,0}

Same thing happens. It dissapears down when you get to far.

Really? Well, that’s weird.

Did you change the billboard gui’s size to 4,0,1,0 and the textlabel’s size to 1,0,1,0? Maybe you didnt understand what I meant.

I recommend turning on AlwaysOnTop too.

I forgot to change the TextLabels position to 0,0,0,0.
Thank you all for helping.

1 Like

I know this is solved but please, next time clarify how your overhead gui works, because as you can tell, most of the replies here thought you were using a Billboard Gui and not a scripted solution, making your post harder to solve

1 Like

Yes, I will do that, I intended to do that, but i guess I just had too much on my mind.

1 Like