So I have this script I use in my FPS games but it looks weird when I just point the head to the players mouse. How can I make this script point the head AND the body to the mouse. This is in a LOCALSCRIPT in the players STARTERGUI. This is also for a 3rd person game!

function load()

    game.Players.LocalPlayer.CameraMode = "LockFirstPerson"

    Tool = script.Parent
    Player = game.Players.LocalPlayer
    Camera = game.Workspace.CurrentCamera
    Mouse = Player:GetMouse()

    local weld1 = Instance.new("Weld")
    weld1.Parent = Game.JointsService
    weld1.C1 = Player.Character.Head.CFrame:toObjectSpace(Player.Character.Torso.CFrame)
    weld1.Part0 = Player.Character.Torso
    weld1.Part1 = Player.Character.Head

    local oldMouseDir = Mouse.UnitRay.Direction

game:GetService("RunService").RenderStepped:connect(function()
        weld1.C1 = CFrame.new(Player.Character.Head.CFrame.p,Player.Character.Head.CFrame.p + oldMouseDir):toObjectSpace(Player.Character.Torso.CFrame)     -- part where it CFrames to the players mouse 
        oldMouseDir = Mouse.UnitRay.Direction
    end)
end

wait(2) --wait for player to spawn 
load()

Thanks!

1 comment

3

If your question get's deleted, please do not reupload it.