Help with error please!

The error is:

Expected ‘)’ (to close ‘(’ at column 26), got ‘,’

local OpenCodesGUIButton = script.Parent.Button
local OpenCodesGUI = game.Players.LocalPlayer.PlayerGui.Codes
local CodesFrame = game.Players.LocalPlayer.PlayerGui.Codes.Codes

OpenCodesGUIButton.MouseButton1Click:Connect(function()
    OpenCodesGUI.Enabled = true    
    OpenCodesGUI.UDim2.new = (0.500, -1, 0)
    
    CodesFrame:TweenPosition(
        UDim2.new(0.317, 0,0.234, 0),
        "Out",
        "Bounce",
        1,
        false
    )
end)

OpenCodesGUI.UDim2.new = (0.500, -1, 0)

That is not how you set a Position or a Size of a GUI. You will have to do:

OpenCodesGUI.Position = UDim2.new(0,500,-1,0

This is because UDim2 is a datatype, not a property.

2 Likes