Problem with my throwable ball

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? 2. What is the issue?
    When shooting the ball while walking it doesnt start where it should start(humanoidRootPart) but works fine when standing still

  2. What solutions have you tried so far?

Video:

1 Like

You see, when you’re referencing the position of the humanoid root part on the server (while in motion), there’s a miscommunication as of where your HRP actually is, due to client-server lag. If you want a more accurate positioning, try passing the HRP’s position from the client to the server as an argument in your remote event!

4 Likes

as the post above me mentioned it is indeed duo to lag related reason that the position is off, happy coding!

Could you show the code that fires the “throw” event?

Screenshot 2024-04-01 201829

I was dumb. I put the declaration at the beginning of the script now i out it in the function but it still got a smaller distance is there a way to fix this? :

Thanks for the help

If you mean the projectile sometimes flying off into the distance, then I suspect it may be considering the projectiles themselves as a valid mouse target, therefore mouse.Hit gets a CFrame near the projectile you’ve already fired rather than where you were intending to aim. I believe you could use mouse.TargetFilter to exclude projectiles when getting mouse.Hit.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.