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

How can I compare a the size of a gui with the absolute size of the gui?

Asked by 8 years ago

I'm trying to make it so if the gui is the same size as the screen (X), it will change the text to "Thanks!"

correct = UDim2.new(0,0,900,0)
if script.Parent.Parent.Parent.Bar.Size.X > correct then
    script.Parent.Text = "Thanks!"
end

This doesn't work and I get an error that says: "Players.Player.PlayerGui.ScreenGui.Frame.status.Script:4: attempt to compare two userdata values"

How can I get this to work?

1
You're comparing a number to a UDim2 value. XAXA 1569 — 8y

Answer this question