Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I have a problem with my GUI's frame not being positioned right, help?

Asked by
VitroxVox 884 Moderation Voter
5 years ago
Edited 5 years ago

So i have this UI problem that the frame that i'm trying to move to the button keeps on going up check the screen shots so you can see what's happenin

How it suppose to look like VS How it looks like

Code

local poses = {
["Team_Change"] = "0.114, -50,2.414, -50",
["Store"] = "0.253, -50,2.414, -50",
["Playerlist"] = "0.376, -50,2.414, -50"
}

for _,buttons in pairs(script.Parent.Main_Frame.menus:GetChildren()) do
    if buttons:IsA("TextButton") then
        buttons.MouseButton1Click:Connect(function()
                script.Parent.Main_Frame.menus[buttons.Name].TextColor3 = Color3.new(236, 201, 0)
                tweenlinetobtn(buttons.Name)    
        end)
    end
end

function tweenlinetobtn(btn)
    for s,poses in pairs(poses) do
    if s == btn then
    script.Parent.Main_Frame.menus.line.Position = UDim2.new(poses)
    print(btn)
    print(s)
    print(poses)
        end
    end
end

> (EDIT) There's no error nor output.

0
Looks like a offset problem (offset and scale) ForeverBrown 356 — 5y

1 answer

Log in to vote
0
Answered by
EDLLT 146
5 years ago

Probably an offset issue

Download this plugin select all of the frames buttons etc and click offset > scale

Here's the link to the plugin

https://www.roblox.com/library/1454007415/Gui-Scale-Offset-converter

Hope this helped you!

Ad

Answer this question