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

How to enable certain keys in roblox?

Asked by 2 years ago
Edited by JesseSong 2 years ago

Hey, scriptinghelpers users. So, I disabled a certain key, but i need to enable it. Here's my code:

local CAS = game:GetService("ContextActionService")
local FREEZE_COMMAND  = "Stunned"

        isSwimming = true
        CAS:BindActionAtPriority(
            FREEZE_COMMAND,
            function() 
                return Enum.ContextActionResult.Sink
            end,
            false,
            Enum.ContextActionPriority.High.Value,
            Enum.KeyCode.R
        )

And i need to enable the R key

0
something u can do is .. make ur script a bit simple its hard to understand so hard to help TheUltimateTNTFriend 109 — 2y
0
something you can do is fix ur bindactionatpriority, You wrote only 1 thing of 4 needed after writing freeze command, the name of the action, you have to write the function to bind for example make a function and bind ur key to that function. then write false or true after that whether u want it to be a touch button, Then after that write the priority number of that bind key, just use 1 as that is TheUltimateTNTFriend 109 — 2y
0
the only bind, And then finally write the key that will activate this or the other thing TheUltimateTNTFriend 109 — 2y

Answer this question