Hello!
Thank you for looking at my question today! I've been working with Tweening and want a specific action to happen with a Gui Size is at {0, 200, 0, 200}
I know it sounds confusing but...
I want to be able to check a Gui's Size and Position via script (Or Local Script), for example, if A gui's size is {0, 200, 0, 200}
, how would I check it and perform an action if that size is true?
What I think could work...
I have a theory code (which means I believe this will work)
local Frame= game.StarterGui.ScreenGui.Frame local Part = workspace.Part if Frame.Size = UDim2.new(0, 200, 0, 200) then Part.Color3 = Color3.new(197/255) end
So...
Will this even work? Or is there an easier method to product this check? Would this work with Tweening as well or not? Thanks for looking at my question, have a great day!
You can't directly input and UDim2 value in an if statement, so use specific properties of them instead.
Example:
local Frame= game.StarterGui.ScreenGui.Frame local Part = workspace.Part if Frame.Size.X.Offset == 200 and Frame.Size.Y.Offset == 200 then -- Code here end
"u used Color3.new, thats not the right color value for parts. thats for gui colors." Color3.new works for BasePart instances.
you need a script that checks when something is changed= OnChange()
your script, it happens only once.
BrickColor!
u used Color3.new, thats not the right color value for parts. thats for gui colors.