Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

CFrame rotate part to mouse.hit? [Unsolved][EDITED] Anyone? They're both CFrame values. Right?

Asked by 9 years ago

What am I doing wrong. I want the object to face the mouse's hit position... Should I use a Lookvector?

Edit Here's the error " Players.Player1.Backpack.Plane.LocalScript:8: bad argument #3 to 'Angles' (number expected, got no value) " Line 8

local Player = Game.Players.LocalPlayer
local Mouse = Player:GetMouse()

while true do
local person = Player.Character
if person ~= nil then
local neck = workspace.Head.Neck
neck.NECK.C0 = neck.NECK.C0*CFrame.Angles (Mouse.Hit)
end
wait()
end

Answer this question