#ContextActionService button for mobile scaling
1 messages · Page 1 of 1 (latest)
** You are now Level 5! **
when i tried to test, the size and the position is different on an iphone and ipad by a bit
i think the issue is ur pos and size in ur CAS, the mobile button setup are defined using absolute pixel values (UDim2.new(0, 65, 0, 65) for size and UDim2.new(1, -70, 0, 10) for position
absolute values dont scale well across different screen sizes
so what can be done for that
and yea i think i realized later when i went to test and checked in the properties
Try
the pos changing UDim2.new(1, -70, 0, 10) to UDim2.new(1, -0.1, 1, -0.15)
then the scale UDim2.new(0, 65, 0, 65) to UDim2.new(0.1, 0, 0.1, 0)
i dont understand how u did that tho?
did it work?
oh sweet
CAS:SetPosition("Crouch", UDim2.new(1, -0.1, 1, -0.15)) is 10% from right, 15% from bottom
then button.Size = UDim2.new(0.1, 0, 0.1, 0) is 10% of screen width and height
okay ill take notes of that, thank you so so much
Yw make sure u add solved gooday
sorry, whats add solved
the tag 😭
All good 😭
wait i dont think that was the solution i think i tested without saving or something cuz now its not working 💀 , when i put the ones u gave the button isnt on the screen anymore
and the size also make it a lot smaller
🥀
wait is it possible to have 2 different cas buttons for mobile?
yes
hmm
not sure im trying to have 2, one for sprint and one for crouch but only sprint shows
each one should have a unique action name