Its my first time testing with context action service, I am actually testing as I don’t know context action service at all.
So the script is:
local contextservice = game:GetService("ContextActionService")
local function jumpplayer(actionname,keycode)
game.Players.LocalPlayer.Character.Humanoid.Jump = true
print(actionname)
print(keycode)
end
contextservice:BindAction("JumpPlayer",jumpplayer(),true,Enum.KeyCode.J)
I tested it after 2 mins after joining, and I tried to change it like this:
local contextservice = game:GetService("ContextActionService")
local function jumpplayer(actionname,keycode)
game.Players.LocalPlayer.Character:FindFirstChild("Humanoid").Jump = true
print(actionname)
print(keycode)
end
contextservice:BindAction("JumpPlayer",jumpplayer(),true,Enum.KeyCode.J)
it says attempt to index nil with jump, it says there is no jump
local contextservice = game:GetService("ContextActionService")
local function jumpplayer(actionname,keycode)
game.Players.LocalPlayer.Character:WaitForChild("Humanoid").Jump = true
print(actionname)
print(keycode)
end
contextservice:BindAction("JumpPlayer",jumpplayer,true,Enum.UserInputType.Keyboard)
Instead of using the Keyboard UserInputType, can’t you use the J keycode form before? Your issue of it not finding a humanoid was simply because it was calling the function instead of setting it