In the code or normal posistion?
No, just find this frame in your gui and set it.
This is the full script that should work:
local players = game:GetService("Players")
local player = players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function ()
local playergui = player.PlayerGui
local booglesframe = playergui.Options.BooglesFrame
booglesframe.Size = UDim2.new(0.958, 0, 0.887, 0)
booglesframe.Position = UDim2.fromScale(0.5, 0.5)
booglesframe.AnchorPoint = Vector2.new(0.5, 0.5)
end)
(the anchor points & positioning were sent by @NeoBuilds, I’d recommend trying different anchor points if the anchor points set in the script do not work as intended (putting the gui off screen slightly))
I did this to the anchor point and it just set it off the screen by half even sizing it was the same
Set the position to UDim2.fromScale(0.5, 0.5)
use auto scale and see if that helps
I hope this website helps you out with AnchorPoint.
https://developer.roblox.com/en-us/api-reference/property/GuiObject/AnchorPoint
I ended up using it and it was the same
Edited this to add anchor point & positioning to the script
you also need to change the position to the centre of the screen
example:
yourframe.Size = Udim2.new(1,0,1,0)
yourframe.Position = Udim2.new(0.5,0,0.5,0)
note you have to change the 1st and 3rd property to 0 if you want to implement window dragging
Have you set the AnchorPoint to 0.5,0.5 and the Position Scale to 0.5,0.5?
yes i did that and that was the screenshot of how it looked when i tried it
Would this be a script on its own without any other code or with code and 1st and 3rd is the numbers right?
that code would run when you click the window (but change “yourframe” to the actual frame you want to change the properties of obviously)
this works because the 0.5,0.5 anchor point means the position of the gui will be from the centre of itself, that’s why you need to change the position to the centre of the screen (Udim2.new(0.5,0,.5,0))
note: anchor point also needs to be 0.5,0.5
is it a local script or a normal one and would it just go on the frame itself
Try this
local players = game:GetService("Players")
local player = players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function ()
local playergui = player.PlayerGui
local booglesframe = playergui.Options.BooglesFrame
booglesframe.Size = UDim2.new(1, 0, 1, 0)
booglesframe.Position = UDim2.new(0, 0, 0, 0)
booglesframe.AnchorPoint = Vector2.new(0, 0)
end)
the Ui is more seeable but is still off screen
Can you send a screenshot? chars
off the ui? or anchor point? or other