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
COMMUNITY QUESTION
How would i make a contextactionservice act as the button "R"?
1 answer
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)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Well, i know what you can use, use the UserInputService instead of ContextActionService(cas) because cas is a bit more advanced