Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I Cant Set Position/Size Of ScreenGuis?

2 questions in less than 2 hours or so i cant set the size or position of an screengui heres the script: (THEY ARE ON THE SAME SCRIPT, IM MAKING THE FE FIRST)

script.parent.MouseButton1Down:Connect(function() local part = Instance.new("TextButton",game.StarterGui.SELECTOR) part.Name = "SELECTORBUTTON" part.Text = "NON-FE-MODE" part.Position = UDim2.new(200, 157) part.Size = UDim2.new(200, 50) end) textButton.MouseButton1Down:Connect(function() local part = Instance.new("TextButton",game.StarterGui.FESG) part.Name = "FeStarter" part.Text = "FE-MODE" part.Position = UDim2.new(0, 157) part.Size = UDim2.new(200, 50) part.disabled = false end) wait(1) if game.StarterGui.FESG.TextButton then wait(1) game.ServerStorage.FESTARGLITCHeER = false wait(1) Disabled = false end if game.Players.LocalPlayer.Character.Humanoid.Health then game.ServerStorage.FESTARGLITCHER = true wait(1) Disabled = true end `

im very bad at scripting sorry.

3 comments

0

whoops scripting helpers destroyed everything! okay heres a pastebin with the same so you can try better: https://pastebin.com/UBYsCGyz

0

Post the code in a code block. By clicking the blue Lua icon.

0

Ok!

1 answer

✓ Accepted answer

Your formatting for the UDim2 data type is incorrect. What you're trying to set is the Offset value in the UDim2 data type, which is properly formatted with four values like so: UDim2.new(0, 0, 0, 0). It's alike to how you view the size or position of a UI element with the brackets omitted.

Here's a portion of the fixed formatting:

part.Position = UDim2.new(0, 200, 0, 157)
part.Size = UDim2.new(0, 200, 0, 50)

Cheers, HollowMariofan

2 comments

0

Wow thanks! I cant test it now because im on mobile, ill try later. Thanks anyways!!

0

Wow thanks! I cant test it now because im on mobile, ill try later. Thanks anyways!!

This discussion is preserved as it was. New answers, comments, and votes are closed.