I’ve recently been working on a project that requires me to make a lot of surface guis. I need every gui to fit perfectly to the front-face of the part, I’m not working with any wedges, spheres, etc. I do not currently have any code, since I really don’t know where to start. If anybody has any idea how to do this, please let me know.
I’m not sure if this is the right category to ask this. It doesn’t sound like code related to me (unless I am missing something here), so maybe design help?
Figured it out on my own, turns out I just needed to find the constant of proportionality between the text label’s X size component and the part’s X size component (same thing for Y).
local k = {
X = SurfaceGui.TextLabel.Size.X.Offset / part.Size.X,
Y = SurfaceGui.TextLabel.Size.Y.Offset / part.Size.Y,
};
SurfaceGui.TextLabel.Size = UDim2.new(0, part.Size.X*k.X, 0, part.Size.Y*k.Y);