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

How would I change the offset of a UIGradient?

A UIGradient has a property called offset, just like textures, but the values are stored like this: (X,Y) and when I try and do this:

script.Parent.Gradient.UIGradient.Offset.X = 1

It will display an error: X cannot be assigned to

How would I change it, would I somehow put both the X and the Y using some kind of udim-like function?

1 answer

✓ Accepted answer

The offset property is vector2, so to change it you would use

locationtoUIGradient.Offset = Vector2.new(1, 0)

This would make the UIGradient have a X offset of 1.

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