how to use Rect in a textbutton pls help
It’s probably better to just use a UDim2 for Gui objects, but this is how you can do it, assuming the values are in scale (0-1 on screen):
local rect = Rect.new(0, 0, 0.2, 0.2)
local rectSize = rect.Max - rect.Min
local textButton = Instance.new("TextButton")
textButton.AnchorPoint = Vector2.zero
textButton.Size = UDim2.fromScale(rectSize.X, rectSize.Y)
textButton.Position = UDim2.fromScale(rect.Min.X, rect.Min.Y)
(Tested, just make sure to parent the text button)
1 Like
but how i use Width pls say it ti ne