Answered by
5 years ago Edited 5 years ago
You've already adjusted the end Angle and start Position, so now you just want the Tween to end where ever your mouse clicked. This is Local, so other players won't see it, your next challenge will be working with RemoteEvents to notify the server and other players of your bullet.
Using mouse.Hit will Tween the part to the mouse CFrame
1 | local info = TweenInfo.new(. 15 , Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0 , false , 0 ) |
2 | TweenService:Create(bullet, info, { CFrame = mouse.Hit } ):Play() |
Using lookVector will Tween the part past the click location
1 | local info = TweenInfo.new( 1 , Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0 , false , 0 ) |
2 | TweenService:Create(bullet, info, { Position = bullet.CFrame.lookVector * 500 } ):Play() |