Hi, I currently have a fully functional third-person shooter script, which works extremely well. But, its not at all what I set out for. In this camera, it locks the character’s movement to the mouse making the character move in the camera’s local direction. Gif below:
https://gyazo.com/48792e6b8aed6f925f5f0da8c700efe8
Is there a way I could modify this script so the character moves independently to the mouse so that the player could walk in different directions facing in those directions and the direction of the camera would only move when the mouse is moved. If anyone could give me some help it would be greatly appreciated. Heres the code:
local player = game:GetService(“Players”).LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local PlayerModule = game.Players.LocalPlayer.PlayerScripts:WaitForChild("PlayerModule")
local cameras = require(PlayerModule):GetCameras()
local CameraController = cameras.activeCameraController
local RunService = game:GetService("RunService")
toggle = true
game.ReplicatedStorage.cameraEnable.OnClientEvent:Connect(function()
CameraController:SetIsMouseLocked(true)
CameraController:SetMouseLockOffset(Vector3.new(1.75, 0, 0))
humanoid.CameraOffset = Vector3.new(1,0.5,0)
player.CameraMaxZoomDistance = 5
player.CameraMinZoomDistance = 5
end)