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

How do I setup ImageRectOffset? [closed]

Asked by
TofuBytes 500 Moderation Voter
10 years ago

I've been testing out a bunch of stuff to why my image button won't work. I'm unsure if I might've set up the ImageRectOffset wrong. Any help on how to fix it?

local ImageButton = script.Parent

ImageButton.MouseEnter:connect(function()
ImageButton.ImageRectOffset.unit = Vector2.new(0, 50)
end)

ImageButton.MouseLeave:connect(function()
ImageButton.ImageRectOffset.unit = Vector2.new(0, 0)
end)

Locked by TofuBytes, adark, and BlueTaslem

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
2
Answered by 9 years ago

You seem to be putting .unit after ImageRectOffset but ImageRectOffset itself is a property and it does not have any properties.. that property itself can be set to a Vector2 so you don't need the .unit afterwards.

Ad