How to set ContextActionService Button size following this script
Context:SetImage("Attack", "rbxassetid://0")
Context:SetPosition("Attack", UDim2.new(0.5, 0,0.4, 0))
How to set ContextActionService Button size following this script
Context:SetImage("Attack", "rbxassetid://0")
Context:SetPosition("Attack", UDim2.new(0.5, 0,0.4, 0))
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)
Thank you so much.It worked well.