I was doing this script, and I got this error
inputs[Enum.KeyCode.Q] = function() -- Energy Blast
if status.Energy.Value >= 10 then
local arm = rightHand
if lastArm == 1 then
arm = leftHand
lastArm = 0
else
lastArm = 1
end
local mousePos
if lockedTarget then
mousePos = lockedTarget.Position
elseif not iosActive and userInputService.MouseEnabled then
--mousePos = mouse.Hit.p -- mirando com o mouse
mousePos = (camera.CFrame*CFrame.new(0,0,-500)).p -- mirando automatico (0,100,-500)
else
mousePos = (camera.CFrame*CFrame.new(0,0,-500)).p -- (0,100,-500)
end
local root = player.Character.HumanoidRootPart
remotes.Training.Blast:InvokeServer(status, stats, humanoidRootPart, arm, character,mousePos)
end
end
the error is the mousepos, but I don’t understand why