What is mouseposition? And since you’re using an external API, you may want to check that it’s not the problem. Try casting yourself, and see if anything changes, and also you should probably try what I said previously, because if your game isn’t in r6, I’m 80% sure that’s the problem.
your mouse click thing is on the shoot button though (because they are touching the shoot button), try setting mouseposition to a raycast result coming directly from the camera
function RaycastToCameraCenter()
local rayInfo = RaycastParams.new()
rayInfo.FilterDescendantsInstances = {game.Players.LocalPlayer.Character}
local result = workspace:Raycast(workspace.CurrentCamera.CFrame.Position, workspace.CurrentCamera.CFrame.LookVector*1000, rayInfo)
return result
end
this returns a raycast result object
(we shouldn’t need a video of you shooting btw)
edit: if you wanna do what Den suggests, just set origin to the current camera cframe and the direction to the current camera lookvector, it’ll work exactly the same but cast from the center of the screen instead of your head