I am attempting to calculate the cframe of a hitbox part with regards to the target humanoid root part, a value to move it around the humanoid and an added velocity value to keep it up with the target in case they move.
I can’t get the part to be positioned properly in the case that the player moves. I have attempted to clamp the velocity values of X and Z, multiplied the cframe by .1 and tried varying other divisions/multiplications without much success.
Do you have a wait() in your code that is causing it to lag behind when calculating the Position?
Are you using a while true do loop, or are you changing the Position based on the Humanoid.RootPart.Position Changed signal?
I do not have any waits in my code, and it is activated through the mouse1 user input. I’m also not using any loops, other than one that checks every frame if there’s any humanoids inside it to deal damage.