UI Position for boxy type screens


Yea I was going to say I was getting that error.

Updated script:

script.Parent.AnchorPoint = 0.5,0.5
script.Parent.Position = 0.5,0,0.5,0

This script should be a normal Script (Not LocalScript), under the frame named “Bottom”. (Which would be the main frame!)

OHHH, I thought you meant in the UI, sorry abt that, I will update you in a second :smile:


I am getting that error now.

One moment while I sort out what I am doing wrong!

you forget to use udm2.new () dude

script.Parent.AnchorPoint = Vector2.new(0.5,0.5)
script.Parent.Position = UDim2.new(0.5,0,0.5,0)
1 Like

Yes, I realized. (text so i can send this)

Okay so it did indeed work, but can I put it inside all of the frames? Because the text buttons are kinda in the bottom frame (main frame) too.

All the buttons should be set, no need to worry about them! The reason I had you put it in the main frame (Bottom) is because it will take the frame, and move it along with all the other buttons and all that!

Which buttons would you be referring to? The currency ones or-

Well as you can see the buttons (the bottom buttons) are along with them because they are inside the Main frame. I tried putting them in the frames by it self, but it does the same thing when you do the original thing you told me to do.

Try making a different ScreenGui for them. If you need help on the coding for making them interactive, I might be open. I have to go in about 10 minutes though.

Yea I was thinking that, I could easily make a ScreenGui just for them. Lemme do that right now :slight_smile: (I know how to do the code for the buttons dw)

Phenomenal - I’m glad I could help! Make sure to solution me so people are aware the problem is solved for the UP Positioning!

There’s actually no reason to use a script. Just set the properties of the frames to the position and anchor point values.

Yes, however its just simpler to make it this way. It was way easier for me to make a script, instead of explaining through 20 different posts.

Actually I have a question, for this script how can I make it parent to the “ExclusiveCodes” Gui Frame? (This is the open script)

script.Parent.MouseButton1Click:Connect(function()
	for _, v in pairs (script.Parent.Parent.Parent.Parent:GetChildren()) do
		if v:IsA("Frame") then
			for _, nV in pairs(v:GetChildren()) do
				if nV:IsA("TextButton") then
					for _, v2 in pairs(nV:GetChildren()) do
						if v2:IsA("Frame") then
							if v2 == script.Parent.Parent.Frame then
								v2.Visible = not v2.Visible
							else
								v2.Visible = false
							end
						end
					end
				end
			end
		end
	end

end)

Did you not even read the messages above?

I don’t know what your preference is, but just adjusting the properties is much more simple than creating a script for it.

P.S. it’s bad practice to use a serverscript for UI related things. It should be a localscript.