Can you show me how much to the right? Like send me a screenshot.
No, this is wrong. Instead parent the MouseHoverGui to the playerGui, and parent the script to the former.
Itâs not good practice.
gui.MainFrame.Position = UDim2.new(0,X,0,Y+gui.MainFrame.AbsoluteSize.Y/2)
You shouldnât have to do this complex sum math if you have it set up correctly, @HystericalBinky make sure that when you set the size of your mainframe, itâs what you were looking for, you may be setting it too large.
Its back to being correctly positioned for the X axis but the Y axis is still to high.
You may have this problem, where youâre positioning it, but the outer frame is too big. I see you are resetting the size in the script.
The size of the mainframe is barely large enough to fit the contents, so it should be fine. The UDim2 that changes the size of the healthbar is just so that it displays properly how much health the enemy/whatever your hovering over has left. I am trying to fix where it positions, the healthbarsize changing should not affect it as it is a child of the MainFrame.
Could you just make sure, by going in game and finding itâs size?
Assuming this is correct, and your set up is seamless, your original code should work properly, if you did everything I said.
gui.MainFrame.Position = UDim2.new(0,X,0,Y)
This works.
I see that the text above is not in the mainframe properly, however I donât mind that as long as the health bar is properly alligned with the mouse.
How high�
Your anchor point is fine, Iâm not seeing anything wrong with the starting code. Can you revert to the starting script? Also make sure you parented the screengui to playergui not to the script.
Idealy I wanted it kind of next to the arrow, but it didnât even position properly without changing its position so I couldnât move it via trail and error myself.
Can you visually tell me what you mean by that?
I did put the screengui under playergui now, I reverted it back to the old script but its still higher then it should be.
Now, check the size. Make sure itâs fitted, do everything I told you before.
I did, it still happens for some reason.
Disable GuiInset, I just realized, lol. Thereâs your solution.