need help with player rotation and headd rotation.

Mariodoesvr

Member
Jun 25, 2024
27
8
190
USA
Pronouns
He, him
so, im making a first person mod and i want it so when the player is in first person their character rotates left and right with thhe camera, and when the player looks up and down so would the characters head but i dont know the variables to use. and when the player is swiming or flying the character just rotates and not the head. can yall help me with that?

here is the code i tried

if fp = true and m.area.camera.focus.Xaxis ~- marioObj.Xaxis then
m.area.camera.focus.Xaxis = marioObj.Xaxis
end

and this one but no error

if fp = true and marioObj.Xaxis ~= m.camera.focus.Xaxis then
marioObj.Xaxis = m.camera.focus.Xaxis
if fp = true and marioObj.head.Yaxis ~= m.camera.focus.Yaxis then
marioObj.head.Yaxis = m.camera.focus.Yaxis
end
end
 
Last edited:

Users who are viewing this thread