You can write your topic however you want, but you need to answer these questions:
I have a script that lerps a model towards the player while moving it up in an arc. moving the primarypart of the model in an arc along with the parts its welded works perfectly fine when there is no rotation
video:
script:
local function ThrowProjectile(PlayerPos)
local ProjectileClone = tomatoProjectile:Clone() -- clones a model of a tomato
ProjectileClone.Parent = workspace.Storage
local root = ProjectileClone.PrimaryPart-- root/primary part already welds every other part
root.Anchored = true
accumDt = 0
local xAdd = math.random(2, 10) -- adding a random rotation value for x,y,z
local yAdd = math.random(2, 10)
local zAdd = math.random(2, 10)
local landPos = PlayerPos -- puts the end position of lerp at player position
while true do
accumDt = math.min(accumDt + frameTime, 1) -- maximum 1
local lerpedPos = tomatoProjectile.MainPart.Position:Lerp(landPos, accumDt) - Vector3.new(0, 5, 0)
local lerpedPosY = lerpedPos.Y -- modify Y position to not make it go straight like X and Z axis
local slerpYOffset = math.sin(math.pi * accumDt) * yOffset -- arc math here
root.Position = Vector3.new(lerpedPos.X, lerpedPosY + slerpYOffset, lerpedPos.Z)
root.CFrame = root.CFrame * CFrame.Angles(math.rad(xAdd), math.rad(yAdd), math.rad(zAdd))
if accumDt >= 1 then
ProjectileExplode(ProjectileClone)
break
end
task.wait(frameTime)
end
end
