Trust aka Tiffergan Posted January 7, 2023 Posted January 7, 2023 local screenW, screenH = guiGetScreenSize() local cursorX, cursorY = getCursorPosition() cursorX, cursorY = cursorX*screenW, cursorY*screenH local boneX, boneY, boneZ = getPedBonePosition(player, boneID) setPedBonePosition(player, boneID, cursorX, cursorY, boneZ) This code gets the position of the cursor on the screen using the `getCursorPosition` function, and then converts the cursor coordinates to screen coordinates using the `guiGetScreenSize` function. It then gets the position of the bone using the `getPedBonePosition` function, and finally sets the position of the bone to the cursor position using the `setPedBonePosition` function. You will need to replace player with a reference to the `player` element, and `boneID` with the ID of the bone that you want to follow the cursor. R
Robiv1 Posted January 7, 2023 Author Posted January 7, 2023 And if, for example, it doesn't show the cursor and I move the cursor like that, how can it be solved?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now