How do you make a your Combat system in your games

i’ve been struggling about making a combat system in ROBLOX and wondering the most efficent way to do it i’m not asking for any script just some advice.

5 Likes

A combat system doesn’t really describe what exactly your looking for. “Combat System” could describe multiple different topics.

1 Like

Like a Fist Combat that you would fine in games like Demonfall and etc

For a general combat system you see in most roblox fighting games, you want these actions:
A basic quick attack move (5 hit combo)
Blocking (for blocking quick attacks)
Dodge (gives Invulnerability and lets you escape attacks)
Blockbreak

All attacks should stun the enemy for a specified amount of time. Quick attacks should stun just long enough that you can hit all 5 attacks. Blockbreaks should have longer stuns.

Everything that happens should be communicated clearly. If you get stunned then you should be able to feel the stun through the effects. When you attack there should be enough effects that your enemy will be able to notice your attack and respond.

I also recommend forcing mouse lock to the combat, so that your character is controlled by your mouse like in first person mode.

7 Likes

by mouse lock, do you mean shift lock?

Yes, but without the toggle behaviour.

1 Like

What’s the best way to stun the player?

1 Like

I recommend doing calculations and playing animations on the client then providing sanity checks for the client & server.

Why on the client?
For better Hitbox & effects responsiveness.

Why sanity checks on both client & server?
Stopping the client before calling the server will save client > server communication, if an exploiter still fires the remote the server will handle it fine.

I’m pretty sure the sword combat for Demonfall makes use of Magnitude because it can hit even if not facing the enemy as long as you’re near (can be fixed by implementing dot product). I suggest going for a Raycast hitbox for weapons because it’s faster and accurate.

4 Likes

Where can I read more about this raycast hitbox?

This is a great place to start, there is also a video linked to the post where you can learn about it.
Raycast Hitbox 4.0: For all your melee needs! - Resources / Community Resources - DevForum | Roblox

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.