Hello I’m using Context Action Service and I’m trying to find out if the object is “End” or “Cancel.” Only problem is it says end and cancel does not exsist. Even though when I print “inputState” it prints out as “Enum.UserInputType.End.”
Error: End is not a valid member of "Enum.UserInputType"
Script:
local function findDirection(name, inputState, input)
if UserInputService.MouseBehavior == Enum.MouseBehavior.LockCenter then
if name == "Forward" and inputState == Enum.UserInputType.End then
elseif name == "Backward" and inputState == Enum.UserInputType.End then
end
if name == "Left" and inputState == Enum.UserInputType.End then
elseif name == "Right" and inputState == Enum.UserInputType.End then
end
end
ContextActionService:BindAction("Left", findDirection, false, Enum.PlayerActions.CharacterLeft)
ContextActionService:BindAction("Right", findDirection, false, Enum.PlayerActions.CharacterRight)
ContextActionService:BindAction("Forward", findDirection, false, Enum.PlayerActions.CharacterForward)
ContextActionService:BindAction("Backward", findDirection, false, Enum.PlayerActions.CharacterBackward)
Thank you.