W is not a valid member of CFrame?

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
image

Are you sure this error comes from the same script? It appears the error is on line 294?

Yes,

Is this what comes up when you click the error from output?

when i press q, yes Do you know why is the reason? pls help

Are you able to show the full error and script so I can help you?

You didn’t provide the part of the script relevant to your issue, search for “.w”/":w".