Tweening the player to act like knockback

Hello, I would like to make knockback like a combat game, and I’ve heard using body velocity is a pretty good way to do it, but it doesn’t give me the effect I want, so here’s the question.

How would I make knockback that tweens the player back and the tween DOESN’T phase through walls?

I really need an example because I’ve seen pretty good combat games with knockback and it doesn’t look like they use body velocity.

Do you have a combatTOOL?

This comment was made the official commenter this post is not yours

No, I am making a combat game and I’d like to make combat tweening, all I need is some example code on how I would go about making it smooth and make it not phase through a wall if it hits one.

Oh, alright, give me a second to write the code you want

Hey, sorry for the late reply

I’m still here if you didnt notice, i’m still working on the code you requested.
Scripters can take a long time to write code :frowning:

The combat game’s attacking code took a really long while to make, it’s like 2k lines and it’s still not even finished.

oh.

Does this need raycast?````

It might, I really don’t want the knockback tween to phase through any walls, that’d make some players stuck forever until they reset😅

oof, sadly you gotta contact an advanced scripter to help out with this whole raycast thing
also somehow my script isn’t working, so you have to contact a advanced scripter :frowning:

If you want animation help DM me.

Wait, I think i can fix the knockback script glitched, you dont have to contact a advanced scripter.
If i cant fix it well you gotta contact a advanced scripter

Okay, but if you do fail do you know any advanced scripters I can ask?

The only i know are
–[
MetaDevv
wedge
]–

Already failed :frowning:

Just dont spam them or you’ll get a 0% chance of creating your effect

You can showcase your combat system to me if you like when it’s finished!

I messaged MetaDevv, and he gave me a working script, thanks a lot.

Glad to help you out. :grin:

justagamedeveloper1 made the comment, no cookies for you if you steal it

u can use this module if u want to make some easy knockback

hope it helps

3 Likes

The topic got solved, but this might be another solution

yeah, just thought of leaving something which is easy to use just in case the person has problems in the future

2 Likes

yea that helped me a lot thanks lol