Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My context action service script doesn’t work?

Asked by 4 years ago

So I’ve tried making it so when you press the button on screen it replicates a keyboard button “Z” But it doesn’t work so far. How do I make a mobile button replicate a keyboard key press?

his is all I've got so far

local contextActionService = game:GetService("ContextActionService")

function onButtonPress()

end

local mobilebutton = contextActionService:BindAction("menu", onButtonPress,true,"z") contextActionService:SetPosition("menu",UDim2.new(0.8,-25,0.20,-25))

Answer this question