Mobile Buttons (how do I make them into 2 Buttons)

So I have been trying but since I am a bit new to mobile buttons i cant get it to work with 2 mobile buttons

The issue is that I have to button done but the reload one will overwriten by the fire one so basicly how do I do so the fire button and the reloading button will be seperate?

The Code


local ContextActionService = game:GetService("ContextActionService")

script.Parent.Equipped:Connect(function()

	ContextActionService:BindAction("Interact", ReloadMobileFunction, true, Enum.KeyCode.R)
		ContextActionService:SetTitle("Interact", "Reload")
	ContextActionService:SetPosition("Interact", UDim2.new(1, -70, 0, 10))
	
	ContextActionService:BindAction("Interact", MobileFireFunction, true, Enum.KeyCode.ButtonR1)
	ContextActionService:SetTitle("Interact", "Fire")
	ContextActionService:SetPosition("Interact", UDim2.new(1, -50, 0, 10))
end)

The name of each action would need to be different (e.g: “Interact”), otherwise it’ll overwrite existing binds with the same name.

Yea thast true thank u didnt get that part

1 Like