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

How would i make a contextactionservice act as the button "R"?

Asked by
Xeo_n 0
7 years ago

Im trying to make a contextactionservice replace the button "R". So far i have, local player = game.Players.LocalPlayer local cas = game:GetService("ContextActionService") halp pls

0
Well, i know what you can use, use the UserInputService instead of ContextActionService(cas) because cas is a bit more advanced VenomiZeD_VamqireXz 111 — 7y

1 answer

Log in to vote
1
Answered by 7 years ago

If you want to make when a player presses R then you can use UserInputService, a more understanding way to register button keys

so here

local UIS=game:GetService("UserInputService")

UIS.InputBegan:connect(function(bttn)
    if bttn.KeyCode==Enum.KeyCode.R then
        print("The Key R was pressed")
    end
end)
Ad

Answer this question