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

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

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

1 comment

0

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

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.