How do you Battlegrounds scripter make Battlegrounds games?

Hello developers, I am Krill, I am wondering on how to make a Battlegrounds game by myself, but I don’t know any way to make abilities or combat system similar to The Strongest Battlegrounds or Heroes Battlegrounds.
I’ve failed many times to create a combat and ability system, I’m wondering if anybody could help/teach me?

This is my first post on DevForum btw

From my experience of looking at battlegrounds games, there are a couple of things I see that you would most likely need.

Hitboxes

First off, a good working hitbox system, as everything evolves around attacking people, having good hitboxes can be a game changer. Ways of making a hitbox system, you could use Raycasts, but for the love of potatos do NOT use any .Touched events I beg :sob:

I would recommend using workspace:GetPartsBoundInBox() or the other variants of that function, as they are very useful for melee combat, explosions, aoe attacks, and more.

Said hitbox system would also require the ability to deal with people who are on lower ping, as otherwise the difference in ping could harm the combat loads. I dont know how exactly you’d program this part in, but when you get to that step, Im sure members here on the devforum would love to help!

Blocking

Most bg games I’ve seen have well, blocking, of which shouldnt be that hard to do.

All you would need to do is send an event to the server and tell it, hey, block! And then send an event to the server when you stop blocking so it well, stops blocking.

Blocking is one of the things that needs to be handled via the server, well just the logic of it.

Now lets say you use an attack that doesnt ignore block, in that case you’d have to check if the target is blocking, if so you need to check if you are Infront of the target.
You can use a hitbox for that part, by just putting one where the targets block protects themself, and if the attack is in that area, then you block it or smth like that.

Characters

Battlegrounds games consist of lots of different characters, so organizing all of that can be difficult, thats why I recommend the use of modules, as they are SO useful for this sort of thing.

What I would do when a player selects a character is relatively simple.
Once they select a character, you would give them a Tool (aka the roblox tool instance), with it corresponding to an attack that the character has.

PS make sure that the RequiresHandle property is off

When the player activates the Tool (Tool.Activated), you would send a remote function to the server telling it to do the corresponding attack.

The remote function would then return a boolean that determines whether or not the player can actually do the attack, in which case they can, the client plays an animation for the attack.

the RemoteFunction would also return a number, which would correspond to the cooldown of the ability, of which on the client, and server, you wouldnt allow the move to be used again until the cooldown time has passed.


As for how to actually create attacks, those consist of things I cant exactly explain, you’d just have to try and code them, but they would require the hitbox system, VFX, animations, and Im sure there are other things.

Overall this if just an example of how you’d go abou it, if you have any questions regarding this, feel free to ask, as I’d love to help you out!

:]

1 Like

omaga thank u for your personal opinion!, but I still don’t understand the concept of a combat system since I never made any good combat system, I’ve created a hitbox module using :GetPartsBoundInBox(). ALOT of my recreation of tsbg/hbg combat system are always laggy and glitchy, and how do you make Abilities work? ( do you use framework? )
( I am not that good in English :sob: )

When it comes to lag and combat Im not really sure how you can fix that, I think there are some work arounds that these games use in order to make the game more playable, what they are I cant tell you as I dont know lol, but hopefully someone will come and be able to tell you lol

Using a framework is completely up to you!
Personally I like creating all of my systems from scratch, but I believe there are some frameworks that could help you out some.

Not all are exactly on the topic, but they might help more than I could lol:

This one talks about how you’d go about making attacks, and making em work ^^^



If you plan to make craters this might help:

1 Like

yippie thanks!
jgfdfghjkl

1 Like

This post just got created, I might help ya out maybe ( I didnt really look lol)

1 Like

Bro it has been 1 minute since I made that post chill out

1 Like

well it seemed useful lol

that and I may have been doom scrolling on all the new posts

1 Like
1 Like