So I was trying to do some kind of part rotationing porpotional to the camera's CFrame. Well I did'nt go so well, in fact I really did'nt expect this to happen. It was origally supposed to rotate a part porpotatinal to the camera ( in 1st person mode). You see nothing errors and the game definitly does something .... Anyways, here's the script:
player = game.Players.LocalPlayer char = player.Character Instance.new("Part",workspace).Position = Vector3.new(0,10,0) Weld = Instance.new("Weld",char['Left Arm']) Weld.Part0 = workspace.Part Weld.Part1 = char['Left Arm'] Weld.C0 = CFrame.new(0,0,0)*CFrame.Angles(0,math.rad(-90),0) game:GetService("RunService").RenderStepped:connect(function() if char ~= nil then Weld.C0 = CFrame.new(Weld.C0.p)+(workspace.CurrentCamera.CFrame.lookVector/.98) --this part I don't get why works (since you can't divide a # by Vector3, right? end end)
I don't wanna give away exactly what happens... so I'm asking to to test my script by opening a new place and putting it into a local script. If nothing happens, well I guess I'm completly insane. But if you can, please explain why it does it's thing, and what I can do to fix it. THX!!