How can I change the size of a ContextActionService button?

Title says it all. Just need a way to change the size of buttons in CAS like with how you can change the position with them.

I guess take a look at this

Use CAS:GetButton() which will return a button, and you will be able to change its UDim2 size.

CAS = game:GetService("ContextActionService")

function myButtonFunction()
	print("My button functions!")
end

CAS:BindAction("MyButton", myButtonFunction, true)

local myButton = CAS:GetButton("MyButton")

myButton.Size = UDim2.new(1, 0,1, 0)

Here’s an example^

2 Likes