So I’m making a Basketball Passing mechanic, though it is easily achievable by just using align position. But using Align position the object always slows down before they reach the end. So I wanted to make the end a little bit further than it is, to achieve the look that the ball didn’t slow down.
It’s a bit hard to explain how I wanted to achieve it, but here’s the script.
local mag = (c.HumanoidRootPart.Position - EndPoint).magnitude
local Pos = ( CFrame.new(c.HumanoidRootPart.Position,EndPoint)*CFrame.new(0,0,-mag-3) ).Position
The Idea is sort of like making a cframe that looks towards the end point and having it go extra mile, which is 3 here. This script used to work, but somehow in this case, the whole placing of the Attachment is just wrong.
Even when the I set the position to:
local Pos = c.HumanoidRootPart.Position
To test out what’s wrong, the attachment still seems to be really off. Here’s a video of it:
I tried setting the attachment’s Position based on other objects such as the ball itself, or the target itself, in this case, the clone model in the video. All of them functions normally, but they can’t achieve what I’m looking for.
If anyone knows what’s causing the problem or how to achieve the outcome I’m looking for please help me out, thanks