Hello everyone
Im trying to make this gun-camera system : https://www.youtube.com/watch?v=XgN4Wpbpd-w&t=
This is what I got yet :
local cam = game.Workspace.CurrentCamera
cam.CameraType = Enum.CameraType.Attach
local RunService = game:GetService"RunService"
local UserInputService = game:GetService"UserInputService"
RunService:BindToRenderStep("MouseLock",Enum.RenderPriority.Last.Value+1,function()
UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
local face = char:FindFirstChild("HumanoidRootPart").CFrame.LookVector
cam.CFrame = CFrame.new(char:FindFirstChild("HumanoidRootPart").WeaponCam.WorldPosition, Vector3.new(face.X * 9999, char:FindFirstChild("HumanoidRootPart").WeaponCam.WorldPosition.Y, face.Z * 9999))
I used UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
to put the mouse in the middle of the screen but I want that the character is following the mouse
I know this is very basic but I didnt scripted for like 6-7 months now
I hope you can help me