hi guys
I created a reporter camera but it has a problem
When the person holding the camera turns, the camera does not turn with the person
this is my code
```
x,y,z = getElementPosition(localPlayer)
local camera = createObject(367,x, y, z)
function updatePed()
setElementBoneRotation(localPlayer,22,0, -60, 0)
setElementBoneRotation(localPlayer,23,90, -100, 80)
setElementBoneRotation(localPlayer,24,80, 30, 0)
setElementBoneRotation(localPlayer,32,0, -85, 10)
setElementBoneRotation(localPlayer,33,-70, -108, -30)
updateElementRpHAnim (localPlayer)
addEventHandler ("onClientPedsProcessed", getRootElement(), updatePed)
end
addCommandHandler("setanim1",updatePed)
function dadancamera()
setElementData(camera,"startlive",true)
triggerServerEvent("messagelive",root)
exports.bone_attach:attachElementToBone(camera,localPlayer,1, 0.15, 0.25, -0.1, 0, 0, 90)
end
addCommandHandler("setanim1",dadancamera)
function updatePed2()
removeEventHandler("onClientPedsProcessed", getRootElement(), updatePed)
destroyElement(camera)
end
addCommandHandler("setanim2",updatePed2)
function didanlive()
if getElementData(camera,"startlive") == true then
addEventHandler ( "onClientRender", root, didanlive )
x,y,z = getElementPosition(localPlayer)
x2,y2,z2 = getElementPosition(camera)
x4,y4,z4 = getElementRotation(camera)
x3,y3,z3 = getElementRotation(localPlayer)
setCameraMatrix(x2,y2,z2,x,y,z2,0,0)
end
end
addCommandHandler("live",didanlive)
function camset()
setCameraTarget(localPlayer)
removeEventHandler ( "onClientRender", root, didanlive )
end
addCommandHandler("ended",camset)
```