You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
i want a clean swing that is easy to hit the ball
What is the issue? Include screenshots / videos if possible!
i cant find anything on how sports games make their swing
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
ive looked on google and youtube and havent found nothing
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
-- i have no code because this is more asking for resources that i cant find
Oh like tennis (next time specify that please, swinging could mean anything. My first thought for some reason was spiderman :0)
Im can lay it out to you how you are gonna do this.
One you’re gonna need to make an animation and anytime you want the player to swing play the animation, while you are swinging use workspace:GetPartsBoundInBox, if it returns the ball then you take the ball an apply some velocity to it to hit it to the other side.
Thats the simple version of it
yes, it not the animation playing that hits the ball. its likely a hitbox that detects if there is a ball inside the hitbox when you press the button to swing.
I’ve got a guide that covers the basics of making hitboxes, though it might be a bit advanced for you, no offense. Though instead of the traditional interval check, you might want to only do a check once the ball is close to a player. The method you should use really depends on the sport, like in golf you shouldn’t really use hitboxes at all.