Mobile Buttons: is it possible to resize using CAS?

Right now i’m making a mobile button but I cant think of a efficient way to resize it, any ideas / features I forgot about?

1 Like

There is a way: You can access the playerGUI and the ContextActionGUI and resize the buttons in there.

Here’s where I found it:

I hope that solves the problem :smile:

1 Like

Thx for the response and ye ik I can do through playergui but I was just wondering if there was a easier feature to use :slight_smile:

There’s a better way to achieve relatively the same result. The result that Carbyne posted is reinventing the wheel for something that already exists in ContextActionService.

What you’ll need to do is use ContextActionService.GetButton. This returns the image associated with your action, so that you don’t need to dig it out of the PlayerGui. The structure of the context actions hierarchy can change, so it’s better to return the button directly.

Once you have this, you can change it’s size right away.

local PunchButton = ContextActionService:GetButton("Punch")

PunchButton.Size = PunchButton.Size /, 0, 0.5, 0)

cc @TheCarbyneUniverse


Thanks! I knew there was something obvious I was missing lol