Hello, I’m trying to create a football, but whenever a mobile user tries to rotate their camera it makes them throw the ball.
UserInputService.InputBegan:connect(function(InputObject, GameProcessedEvent)
local UserInputType = InputObject.UserInputType
local KeyCode = InputObject.KeyCode
if (GameProcessedEvent or _G.Typing) then
return
end
if (UserInputType == Enum.UserInputType.MouseButton1) or (UserInputType == Enum.UserInputType.Touch) then
if player.Character:findFirstChild("Football") and humanoid.WalkSpeed>0 then
if player.Character.Football:findFirstChild("Fire") then
print("ClientThrow");
PlayAnim("Throw");
player.Character.Football.Fire:FireServer("Throw",(mouse.Hit.p-game.Players.LocalPlayer.Character.Head.Position).unit,power);
end
else
Act:FireServer("Catch")
end