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

How do I make my image gradually get smaller on the screen when it covers it?

I'm trying to do a little animation to an image label that covers the screen and then gradually gets smaller until a certain size. The error is: X cannot be assigned to

local i = script.Parent.ImageLabel
function sizeX(a, b, c)
	for x = a, b, c do
		i.Size.X = Vector2.new({a, b, c}, 0)
	end
end

function sizeY(a, b, c)
	for y = a, b, c do
		i.Size.Y = Vector2.new({a, b, c}, 0)
	end
	wait(.001)
end

wait(3)
sizeX(1, .1, -.01)
sizeY(1, .2, -.01)

2 comments

0

GUI's work with UDim2.new, I don't think they work with Vector2.new ?

0

The only time Vector2.new() is used on a Gui is when it is used for any of these http://wiki.roblox.com/index.php?title=Vector2#Referenced_by

1 answer

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