How To Make Battlegrounds Combat System Part1 (Roblox Studio)
Комедия
How To Make Battlegrounds Combat System Part1 (Roblox Studio)
This is the first part of the tutorial
I'll explain how to make a battlegrounds combat system
/\*/\*/\*/\*/\*/\*/\*/\*/\*/\*/\*/\*/\*/\
Tomato Hitbox Module: www.roblox.com/library/147270...
CombatServer: pastebin.com/WsNdpURU
Main: pastebin.com/epKkPnKS
CombatClient: pastebin.com/pbLR9H3n
Join my Discord Server (Cus why not 🤷♂️)
Discord: / discord
Same with my roblox group:
Group: www.roblox.com/groups/3290109...
\/*\/*\/*\/*\/*\/*\/*\/*\/*\/*\/*\/*\/*\/
Пікірлер: 1 000
"whats your special talent?" "typing in light speed."
@GamingScripter
3 ай бұрын
What did you missed? Him editing the speed
@Frim_ms
2 ай бұрын
💀
@Sonics_gaming
20 күн бұрын
looks like you don't know editing
@The_Shadows-eq2tj
7 күн бұрын
AHHAHAHA
ayo, very fire video man! Keep up the good work :]
Props to this guy, I watched the entire vid and I dont even have Roblox studio. He made a tutorial that’s informative and entertaining
@Naltico
8 ай бұрын
@@g0joshortsyou need to train text interpretation, and I don't even speak English.
@IAmPumpPumpIsLife
8 ай бұрын
@@Nalticobasically he’s saying when you get roblox studio, you have to log in through the studio and create a game.
@thatidiotoverthere6311
5 ай бұрын
@@IAmPumpPumpIsLifeYeah that’s the idea 🤔
@vikovitch
4 ай бұрын
corny levels dangerously high, termination reccomended
@gheorghiialamov2063
3 ай бұрын
Bro just you in Mobile
Damn man, I couldn't figure why the animations were not playing for my friend, and you just solved my problem casually. Thanks!
@TrueRed96
5 ай бұрын
thats a kinda funny glitch that happens with roblox, Animation is private, if it continues, consider playing offline animations
I like how u scripted it step by step as if you were a beginner, forgetting steps before making it work completely. This explains why it doesn't work and not just giving answers. Best scripting tut vid I've seen in years tbh good job.
THIS TUTORIAL IS GREAT! one thing is, guys.. dont give up the first time u get an error, watch the video to the end and keep trying and testing things till it works
@aaaeebaaee
4 ай бұрын
the thing is i dont even get errors
@Thechummiestofbuckets
Ай бұрын
@@aaaeebaaeeSame plus I speant two hours on this and it did NOTHING
@jacksonsalles4078
Ай бұрын
for me it says "attempt to index nil with 'WaitForChild' " like is the script it self the problem?
Finally I understand animations events, and they’re just what I need! Amazing tut man, earned a sub for sure!
@stanleymiles2693
3 ай бұрын
yo how to create the animation event thing
@seadrown6252
2 ай бұрын
left click and press insert object then select 'animation' or 'animator' or whatever you need@@stanleymiles2693
Thank you so much bro im working on a battleground game right now and this is helping me out A LOT
@TheTomatoo
8 ай бұрын
No problem 👍
@Little_G00ber
8 ай бұрын
SAME
@erawatyly385
8 ай бұрын
SAME BOOBOOBEAR
@Donpa07
8 ай бұрын
is it dxd battlegrounds?
@bozboyzplaytime7386
3 ай бұрын
Bro where are the folders 😭
thank you! i am creating a game. ive made a punch animation and other things. i recommend using 120 fps for the punches so they are faster! overall i love this tutorial
Make it that when you use m1s,you get slower like in all of battlegrounds games. This video is also entertaining,not only informative.
@Literally_Kirby
2 ай бұрын
I would look at a sprint script and see how that works then apply is so then if an animation is playing the playerSpeed would equal to ur new value, pudeocode would be this: defaultSpeed = 1000 // 1000 is just an example, this will also be ur actual speed baseSpeed = deafultSpeed slowSpeed = defaultSpeed * 0.2 // 0.2 is also just an example if animation is playing then defaultSpeed = slowSpeed else defaultSpeed = baseSpeed end
Man bro your amazing,I can’t even animate but now I’ll try, thanks
goated vid it helped me so much for my game
Bro your tutorials are so detailed and simple. Instead of me just copying what you do i review the things you did so i can apply them And learn from those things, You earned a sub from me
I just found out, if you don't have moon animator, and your using the normal animator, rename the key frames to "Hit" instead of creating a animation event. That's what i did and it worked
@bruhwhosjustin1790
7 ай бұрын
what keyframes?
@selvoid
7 ай бұрын
@@bruhwhosjustin1790 the key frame right before the punch
@kalebanimations3786
7 ай бұрын
in what folder?
@mr.flowerflavor4356
7 ай бұрын
sir i need help doing a combat system could you help me? if yes pls help me. also a saturo fan btw
@YourLocalEditzz
7 ай бұрын
How do u rename?
beautiful. peak art. unbearably incredible.
Yo, thanks! Me and a few others are making a fighting gams, and it's my first time actually scripting a fighting system yk. And this game me a general basis on how to do it, so yeah, awesome!
So satisfying watching somebody code
I was here before 100 views. I know, this video will be kinda popular. So im old tomato’s fan!
@termai853
8 ай бұрын
Me too
GREAT VIDEO KEEP UP THE WORK!
very understandable and helpfull! Tysm
So if you arent using moon animator what should you do instead of the animation event im guessing just rename the keyframe where the punch is at its farthest point
@KC1598-ll3nr
8 ай бұрын
How to I rename
@TrueRed96
5 ай бұрын
i think almost every animator has the event thing, unless you're doing it outside roblox studio
Hey, i got a question for you, how did you reflect the animation 1 and 2?
@Yeblen
5 ай бұрын
moon animator has it
@TLWM111
5 ай бұрын
@@Yeblen whats the keybind
@randoAnim
5 ай бұрын
@@TLWM111 control r
@TLWM111
4 ай бұрын
@@randoAnim I already know it now, But thanks mate
VERY GOOD ANIMATION I JUST LOVE IT🤩
BRO TYYYY VERY MUCH YOU JUST SAVING MY PROJECT'S LIFE
why doesnt it work?
@Iraqi_samurai
Ай бұрын
What’s the matter
@Car_demon87
Ай бұрын
@@Iraqi_samurai so basically i used the script like he told me and other shit and when i tried it didnt work like wtf
@josephvacco8790
Ай бұрын
@@Car_demon87you didn’t copy something right
@Iraisedyou
Ай бұрын
You probably had it under a “normal script” instead of “local script”
@BAALEN_OFFICIAL
Ай бұрын
Yes
For those of you who want the character to slow down while punching, here is my modified CombatServer script that does exactly that: local rp = game:GetService("ReplicatedStorage") local remotes = rp:WaitForChild("Remotes") local animations = rp:WaitForChild("Animations") local punchRemote = remotes:WaitForChild("Punch") local ss = game:GetService("ServerStorage") local modules = ss:WaitForChild("Modules") local TomatoHitbox = require(modules:WaitForChild("TomatoHitbox")) local MAX_COMBO = 4 local function changeCombo(char) local combo = char:GetAttribute("Combo") if combo >= MAX_COMBO then char:SetAttribute("Combo",1) else char:SetAttribute("Combo",combo + 1) end end local function getPunchAnim(char) local combo = char:GetAttribute("Combo") local punchAnims = animations:WaitForChild("Combat"):GetChildren() local currAnim = punchAnims[combo] return currAnim end local function stopAnims(object) for i,v in pairs(object:GetPlayingAnimationTracks()) do v:Stop() end end punchRemote.OnServerEvent:Connect(function(player) local char = player.Character local hum = char:WaitForChild("Humanoid") local humRp = char:WaitForChild("HumanoidRootPart") local attacking = char:GetAttribute("Attacking") local punching = char:GetAttribute("Punch") if attacking or punching then return end char:SetAttribute("Attacking",true) char:SetAttribute("Punch",true) changeCombo(char) stopAnims(hum) hum.WalkSpeed = 8 -- THIS IS A LINE I ADDED local newHitbox = TomatoHitbox.new() newHitbox.Size = Vector3.new(4.5, 5, 4) newHitbox.CFrame = humRp newHitbox.Offset = CFrame.new(0,0,-1.5) newHitbox.onTouch = function(enemyHum) if enemyHum ~= hum then enemyHum:TakeDamage(10) end end local playPunchAnim = hum:LoadAnimation(getPunchAnim(char)) playPunchAnim.KeyframeReached:Connect(function(kf) if kf == "Hit" then char:SetAttribute("Attacking",false) task.spawn(function() hum.WalkSpeed = 15 -- THIS IS ANOTHER LINE I ADDED newHitbox:Start() task.wait(0.1) newHitbox:Stop() newHitbox:Destroy() end) if char:GetAttribute("Combo") == MAX_COMBO then task.wait(1) end char:SetAttribute("Punch",false) end end) playPunchAnim:Play() end) Enjoy :)
@choFu31
6 ай бұрын
thanks dude
@misterretro_
6 ай бұрын
@@choFu31 no problem!
@dejv9427
6 ай бұрын
my character is not able to punch, idk why tho @@misterretro_
@Dohruu
6 ай бұрын
you need to create animation@@dejv9427
@user-mx2be2tr2x
6 ай бұрын
Infinite yield possible on 'ServerStorage:WaitForChild("Modules")' , how to fix this problem?
Been working on using python to write games and before that course started i was confused on what was being said on the vid. Now I fully understand some of the aspects of the code. While not all of them (like the child commands) I can sort of interpret the code for roblox as python code. Both have very similar properties, just some writing differences.
Ty man now my and my friend can develop our battlegrounds game
Hey! I have followed this script almost entirely one to one, but for some reason whenever I start punching the error "ServerStorage.Modules.TomatoHitbox:159: attempt to call missing method '_Visualize' of table" floods my output repeatedly, and eventually causes massive lag to start building up. I also don't deal damage to the dummy at all. Any help would be greatly appreciated!
@pulograin
7 ай бұрын
Send your server script
@YOSTUDIOS45
5 ай бұрын
same
@JozinZeBazin
5 ай бұрын
i hvanet watched the tutorial yet but i see that it says "TomatoHitbox" and the youtuber who made this tutorial´s name is... The Tomato, so im guessing if your roblox name isnt Tomato or something(but the youtubers rblx acc name would probably be) then i think in that part of the video youre supposed to write, like something else, maybe your username. But im not good in scripting language and i havent watched the tutorial yet so this is unlikely.
@Glitcheey
5 ай бұрын
@@JozinZeBazin Yeah that's not the problem. TomatoHitbox is just the name of the module, it has no connections to any username
@NarutoKinnie_yt
3 ай бұрын
@@pulograinhey I need help, when I put animations on the 20th scetence on combat server it says “unknown global user”
hey I need help I'm getting the error "Infinite yield possible on 'ReplicatedStorage:WaitForChild("Remotes")" what can I do to fix this?
@floppasayshi
5 ай бұрын
you spelt the Remotes folder wrong
@1LightZ7
4 ай бұрын
@@floppasayshi no its spelled right i have the same issue but its with module
@thatoneguyeveryonehates789
3 ай бұрын
you probably already fixed this but when I fixed it I felt pretty stupid. I put the Remotes folder inside of the Animations folder instead of ReplicatedStorage, and when I put the Remotes folder into ReplicatedStorage it worked.
@floppasayshi
3 ай бұрын
@@1LightZ7 then the folder is on wrong location
@1LightZ7
3 ай бұрын
@@floppasayshi very helpful -_-
Thank you this helped a lot
Thanks for this.
if you dont want the character to still walk at a normal speed while punching use this modified CombatClient: local rp = game:GetService("ReplicatedStorage") local remotes = rp:WaitForChild("Remotes") local animations = rp:WaitForChild("Animations") local punchRemote = remotes:WaitForChild("Punch") local ss = game:GetService("ServerStorage") local modules = ss:WaitForChild("Modules") local TomatoHitbox = require(modules:WaitForChild("TomatoHitbox")) local MAX_COMBO = 4 local function changeCombo(char) local combo = char:GetAttribute("Combo") if combo >= MAX_COMBO then char:SetAttribute("Combo",1) else char:SetAttribute("Combo",combo + 1) end end local function getPunchAnim(char) local combo = char:GetAttribute("Combo") local punchAnims = animations:WaitForChild("Combat"):GetChildren() local currAnim = punchAnims[combo] return currAnim end local function stopAnims(object) for i,v in pairs(object:GetPlayingAnimationTracks()) do v:Stop() end end punchRemote.OnServerEvent:Connect(function(player) local char = player.Character local hum = char:WaitForChild("Humanoid") local humRp = char:WaitForChild("HumanoidRootPart") local attacking = char:GetAttribute("Attacking") local punching = char:GetAttribute("Punch") if attacking or punching then char.Humanoid.WalkSpeed = 4 wait(0.5) char.Humanoid.WalkSpeed = 16 end if attacking or punching then return end char:SetAttribute("Attacking",true) char:SetAttribute("Punch",true) changeCombo(char) stopAnims(hum) local newHitbox = TomatoHitbox.new() newHitbox.Size = Vector3.new(6,6,6) newHitbox.CFrame = humRp newHitbox.Offset = CFrame.new(0,0,-2.5) newHitbox.onTouch = function(enemyHum) if enemyHum ~= hum then enemyHum:TakeDamage(10) end end local playPunchAnim = hum:LoadAnimation(getPunchAnim(char)) playPunchAnim.KeyframeReached:Connect(function(kf) if kf == "Hit" then char:SetAttribute("Attacking",false) task.spawn(function() newHitbox:Start() task.wait(0.1) newHitbox:Stop() newHitbox:Destroy() end) if char:GetAttribute("Combo") == MAX_COMBO then task.wait(1) end char:SetAttribute("Punch",false) end end) playPunchAnim:Play() end)
@imsiliconicbull1404
Ай бұрын
Im pretty sure thats combat server?
@kodatoo
26 күн бұрын
why is it so delayed
can someone help? i copy the code from the link but it still doesnt work. i have r6 and the animation setting on standard PLEASE HELP
@fiolet_shmonya
8 ай бұрын
Same
@Angel-fl6gl
8 ай бұрын
still nobody knows how to fix it?@@fiolet_shmonya i also have this trouble Touched is not a valid member of Model "Workspace.Model.Model". i did absoulutely all right..
@insertgenericgamingchannel6628
7 ай бұрын
what error are you getting
@Mrwoof_tophat
7 ай бұрын
ok so idk how but i made it work!!!!!!!! all i need now is just a slower cooldown
thank you so much im creating alot today.
THANK YOU SO MUCHH ITS WORKING
tomato can you please make it a public model so we can use it right away it would be really helpful thanks.
@MaskedManStraw
8 ай бұрын
Lazy.
@yellowboi2879
8 ай бұрын
dawg you still need to spoof/make the animations yourself also its a tutorial to make your own battlegrounds not steal your own battlegrounds game
i cant punch
@crusader_gaming8273
8 ай бұрын
Try using your hands
@Dastyyyyy
8 ай бұрын
@@crusader_gaming8273😂😂😂
@S0n1cHedghog-xe4fy
8 ай бұрын
@crusader_gaming8273 LOL
@Rel_yt
8 ай бұрын
@@crusader_gaming8273 try using your brain
@AnoopMahendrakar82
8 ай бұрын
@@Rel_ytOHHHHHHHHH
You got yourself a new subscriber
nice thanks btw i rilly wanted to make this
THIS IS THE MOST TIME IVE WASTED EVER
@panoaa1254
8 ай бұрын
Why is it fake?
@XALL100
8 ай бұрын
@@panoaa1254 its not fake it just dosent work
@loudmat7660
8 ай бұрын
i did it and it works
@BaldibasicsYT
8 ай бұрын
@@loudmat7660 who asked
@loudmat7660
8 ай бұрын
@@BaldibasicsYT then don't comment stupid things
YESSSS TYSM NOW I CAN DO COMBAT SYSTEM IN MY GAME!!!!!!!
I made a little animation and a code here but my punches aren't doing any damage and they're all coming out at the same time. And i used this tutorial
Tanks bro, i love you
Thank you so much bro I’m making my own battlegrounds game and thank you for helping us make it our game will be called color battlegrounds
thank you Bro (works for me)
New sub unlocked
Thanks
ty, im gonna make an bg game with my friend, tysm
Couple of things I don't like here, playing the animations on server is a first, sometimes client changes its state unexpectedly and the server doesn't know about it, so your animation can still play while it's not supposed to. Then keyframe reached on the same animation is i guess fine but you wouldn't do that if you played animations locally. 2nd thing is making a second script for adding an attribute when you could have done that in one without an issue, and final is making a remote event specifically for punching, while you can make one handle all the attacking / abilities and etc..
Thx now ican make my sandbox/battlegrounds
Can you do a part 3 for abilities and adding new characters?
Thx bro
bro ur the best
The song hits like it’s a very good song
It is too basic scripting, the system is basic and efficient, it is good for players who want to become true developers, a very useful video!
Thanks cause i wanna make a battlegrounds game similar to transformers:))
to make it more faster with the animation drag the keyframes more closer to echother
Question. What do I do if when I put in the Line of code that makes it so you can punch more It stops Punching?
Thanks bro i think im gonna make m'y battleground but only for me and m'y Friend so i Can add their own attack
Yo Great vid but can you use the roblox animation for me? I dont know how to use the moon/blender animator
Hey, I've scanned through every single line and haven't been able to find a single reason as to why mine won't punch, I've all the settings as you and made sure of it, literally my first ever time using this studio (I'm used to basic 2d rendering in Javascript and such) any tips as to what may be happening? Cheers
what do you press to rotate and move a body part for your dummy in animation editor?
deserves a like:) i can only hit once tho but deserves a like
nvm best guy ever it worked
New sub❤
if you are using the roblox editor, how do you 'export' the animation?
FINALLU YES IM TRY SO HARD TO MAKE A GOOD GAME
Can you make a simple one for beginners because this one is way too hard for me as I just starting scripting roblox studio this year
How did you make the 2nd punch mirror like that?
Thanks dude im tryna make a bleach game cuz and couldnt get anythin
bro, i can't belive im saying this but, YOUR A TRUE SIGMA because you are the one and only person who said this so clearly and understandable to us.
@floppasayshi
5 ай бұрын
💀
are you sure it works in Roblox Animate aswell? mine doesnt work (you used moon animator but I used the Roblox animator).
Hello! I don't like hitboxes but i like your work, so can you make without hitboxes?
@slowpurplealien
5 ай бұрын
You can do ontouch with the enemyhum
Can I use the first animation and like make it twice? (Explaining: 1 click Punch1 2 click Punch2 3 click Punch1 4 click Punch3 )
i am crying how are you making smooth animations and that fast?? what am i doing wrong???
Hey I’m making a battlegrounds game and I was wondering if it’s alright if I use this as the main system
nice
Thanks SO MUCH FOR MY GAME but my animation :)
Why playing the first animation with hitbox but then the second animation playing without hitbox then anymore animation dosent playing?But if i change max combo 1 it working?Where i did a misstake?
Hey! That's an amazing project! Can I get the animations please?
I made a Jjk battle ground game with this😂 Ty
@Exolito
4 ай бұрын
thats what im doing lol
FINE!
The issue is how would ultimate's be made? For the cutscenes i mean, i don't have moon animator but I am not sure if I need it for that.
how do you add a punch five? also keep up the good content
@z_n.
8 ай бұрын
just modify the scripts, and add another animation for the extra punch.
do you add animation event to every animation or just the first one?
@bebra3392
5 ай бұрын
every
could you make a model describing where to put everything or make this place editable if its not a problem, this way the it could be way easier for people who run into problems and output errors
i need this man to be my animator LOL
im going to try it i hope it helps : edit: i have tryed your one before but it didnt work so i hope this one works
W vid
Please do part 2 soon!!
Tomato can u make a video on how to do this but on Animation editor bc i really wanna do this i dont got moon animator
Hey i got at problem with the red hitbox, where the the hitbox doesnt move along with the animation and its on my spawn stuck there? and its not dealing damage to the dummy??
Cool
How do you get that thing in start that board you need.where up you get it?
U can animate it with the video right for animation
time to mock battlegrounds games that trend hop, thank you
when i pasted in the script for the CombatServer it said "ServerScriptService.CombatServer:89: Expected 'end' (to close 'function' at line 38), got ; did you forget to close 'then' at line 79?" how do i fix that? (edit: i got it to work but now i only punch once idk why -_-)
this guy is too smart
i kinda made one animation that has everything that it more better then this does that change anything?