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

I Cant Set Position/Size Of ScreenGuis?

Asked by 5 years ago

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.

0
whoops scripting helpers destroyed everything! okay heres a pastebin with the same so you can try better: https://pastebin.com/UBYsCGyz RedLecko434 -1 — 5y
0
Post the code in a code block. By clicking the blue Lua icon. User#19524 175 — 5y
0
Ok! RedLecko434 -1 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

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

0
Wow thanks! I cant test it now because im on mobile, ill try later. Thanks anyways!! RedLecko434 -1 — 5y
0
Wow thanks! I cant test it now because im on mobile, ill try later. Thanks anyways!! RedLecko434 -1 — 5y
Ad

Answer this question