Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Mobile button line that press a key?

So i wanna out a line im the mobile button so it can press the key Q but idk how :

local cas = game:GetService("ContextActionService")

local plr = game.Players.LocalPlayer

local function buttonPressFunction()

     where i wanna put the line so it can press the key Q

     cas:UnbindAction("StandButton")

end

local button = cas:BindAction("StandButton", buttonPressFunction, true, Enum.KeyCode.Q)


cas:SetPosition("StandButton", UDim2.new(0.58, 0, 0.15, 0))

1 answer

See this page

If you want to use events.

Add a remote event into replicated storage, and fire it for both th q pressed and button. Giving them the same outcome.

1 comment

0

i don't understand

This discussion is preserved as it was. New answers, comments, and votes are closed.