Need Help With Animations for Gui

My Tween Gui Script wont work, is there a way to fix it?
Also, I’m trying to tween a Image Button

local v24 = v7.BuyCash
v24.MouseEnter:Connect(function()
	print("We are here!")
	v24:TweenSize(
		print("Wow it tweened"),
		UDim2.new(0, 50,0, 50),
		UDim2.new(0, 175,0, -38),
		"Out",
		"Quad",
		.2,
		true -- Enables overright (don't recommend using it a script controlling the entire gui)
		-- Good to put in a seperate script
	)	

end)
v24.MouseLeave:Connect(function()
	v24:TweenSizeAndPosition(
		UDim2.new(0, 42,0, 42),
		UDim2.new(0, 180,0, -34),
		"Out",
		"Quad",
		.2,
		true
	)	
end)

1 Like

In your MouseEnter event, there’s two Udim2 inside a TweenSize, which only requires one.

Also, the print inside the TweenSize cannot work. The game will always call for a Udim2 on the first parameter.

1 Like