I have this much so far. I need to make the head rotate in the direction the player is looking. My problem is that I am not quite sure how to do this. I have tried to use the camera's CFrame properties. My problem is that I don't know how to put this into the script.
local tool = script.Parent
local player = game.Players.LocalPlayer
repeat wait() until player.Character
local char = player.Character
local head = char:WaitForChild("Head")
local mouse = player:GetMouse()
local torso = char:WaitForChild("Torso")
local equipped = false
local weld = Instance.new("Weld")
function equip()
equipped = true
while equipped == true do
wait()
weld.Parent = head
weld.Part0 = head
weld.Part1 = torso
weld.C0 = CFrame.new(0, -1.5, 0) -- My problem begins here. I have the position of the head, now I need to have it constantly update the heads rotation in the direction of the camera.
end
end
function unequip()
equipped = false
end
tool.Equipped:connect(equip)
tool.Unequipped:connect(unequip)
