OK, I’ll explain this
so i have a problem in Button for Tablet, where Button Position and Size is Very different when i try it on Tablet. but when i try it on Phone it is very normal Button Size and Position but. when i try it on Tablet Size and Position is very different so… is there any solution for this problem??
Phone
Tablet
Code
local ContextActionService = game:GetService("ContextActionService")
ContextActionService:BindAction("sprint", OnInput, true,Enum.KeyCode.LeftShift)
ContextActionService:SetImage("sprint", "rbxassetid://1114393432")
local actionButton: ImageButton = ContextActionService:GetButton("sprint")
if actionButton then
actionButton.ImageColor3 = Color3.fromRGB(255,255,255)
actionButton.Position = UDim2.new(1,-81,1,-170)
actionButton.Size = UDim2.fromOffset(70,70)
actionButton.ImageTransparency = 1
local notpress = "rbxassetid://8618269848"
local press = "rbxassetid://14112658774"
local ButtonFAKE = Instance.new("ImageLabel")
ButtonFAKE .Parent = actionButton
ButtonFAKE .BackgroundTransparency = 1
ButtonFAKE .Size = UDim2.fromScale(1, 1)
ButtonFAKE .ScaleType = Enum.ScaleType.Fit
ButtonFAKE .Image = notpress
actionButton:GetPropertyChangedSignal("Image"):Connect(function()
if actionButton.Image == "https://www.roblox.com/asset/?id=97166444" then
ButtonFAKE .Image = notpress
else
ButtonFAKE .Image = press
end
end)
end