ContextActionService Problem

I am trying to do a punch animation everytime a player clicks a button. Using contextactionservice. Ive been hearing that mouse is way uneffiecient then contextactionservice. Here is the script:

–ContextActionService

BasicMeeleAnimation - Roblox

Repel 3 - Roblox

local ContextActionService = game:GetService(“ContextActionService”)

local tool = script.Parent

local player = game.Players.LocalPlayer

local character = player.Character

if not character or not character.Parent then

character = player.CharacterAdded:wait()

end

local humanoid = character:WaitForChild(“Humanoid”)

local PUNCH_ACTION = Instance.new(“Animation”)

local REPEL_ACTION = Instance.new(“Animation”)

PUNCH_ACTION.AnimationId = “BasicMeeleAnimation - Roblox

REPEL_ACTION.AnimationId = “Repel 3 - Roblox

local function handleAction(actionName,inputState,inputObject)

if actionName ==PUNCH_ACTION and inputState == Enum.UserInputState.Begin then

local animationTrack = humanoid:LoadAnimation(PUNCH_ACTION)

animationTrack:Play()

else

print(“No”)

end

end

tool.Equipped:connect(function()

ContextActionService:BindAction(PUNCH_ACTION, handleAction, true, Enum.UserInputType.MouseButton1)

end)

It isnt that the mouse is inefficient for it its that it is a way for the mouse to be supportive on all systems. If you are truly having problems with it you can make several event listeners for different OS’s/devices

If you’re have a problem with a script, please at least give us the following information: what the problem is, if you’re getting any errors, and what you’ve tried to fix it. You haven’t given us much of anything to help us narrow down what problem you’re having.

So I should be using mouse only then?

What I am trying to say is it isnt that mouse is neccesarily inefficient rather that it wont work for somebodies iPad

Ok I get it now. Thank you for the help