How To Make Battlegrounds Combat System Part1 (Roblox Studio)

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ม.ค. 2025

ความคิดเห็น • 1.2K

  • @Kirbo465
    @Kirbo465 ปีที่แล้ว +172

    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
      @Naltico ปีที่แล้ว +5

      ​@@g0joshortsyou need to train text interpretation, and I don't even speak English.

    • @IAmJuniorJuniorIsLife
      @IAmJuniorJuniorIsLife ปีที่แล้ว +2

      ⁠@@Nalticobasically he’s saying when you get roblox studio, you have to log in through the studio and create a game.

    • @thatidiotoverthere6311
      @thatidiotoverthere6311 ปีที่แล้ว

      @@IAmJuniorJuniorIsLifeYeah that’s the idea 🤔

    • @vikovitch
      @vikovitch ปีที่แล้ว +2

      corny levels dangerously high, termination reccomended

    • @gheorghiialamov2063
      @gheorghiialamov2063 11 หลายเดือนก่อน

      Bro just you in Mobile

  • @random9159
    @random9159 ปีที่แล้ว +21

    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
      @aaaeebaaee ปีที่แล้ว +1

      the thing is i dont even get errors

    • @Thedudemandudemandude
      @Thedudemandudemandude 9 หลายเดือนก่อน +1

      @@aaaeebaaeeSame plus I speant two hours on this and it did NOTHING

    • @jacksonsalles4078
      @jacksonsalles4078 9 หลายเดือนก่อน

      for me it says "attempt to index nil with 'WaitForChild' "
      like is the script it self the problem?

    • @raseli-sp7oc
      @raseli-sp7oc 7 หลายเดือนก่อน

      @@Thedudemandudemandude because you are dumb :/

    • @raseli-sp7oc
      @raseli-sp7oc 7 หลายเดือนก่อน

      @@jacksonsalles4078 no, you gotta be more specific dude, whats the full error

  • @boban112
    @boban112 ปีที่แล้ว +25

    Damn man, I couldn't figure why the animations were not playing for my friend, and you just solved my problem casually. Thanks!

    • @EveryReaper
      @EveryReaper ปีที่แล้ว

      thats a kinda funny glitch that happens with roblox, Animation is private, if it continues, consider playing offline animations

  • @selvoid
    @selvoid ปีที่แล้ว +70

    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

    • @bruhwhosjustin
      @bruhwhosjustin ปีที่แล้ว +2

      what keyframes?

    • @selvoid
      @selvoid ปีที่แล้ว +2

      @@bruhwhosjustin the key frame right before the punch

    • @kalebanimations3786
      @kalebanimations3786 ปีที่แล้ว +1

      in what folder?

    • @mr.flowerflavor4356
      @mr.flowerflavor4356 ปีที่แล้ว

      sir i need help doing a combat system could you help me? if yes pls help me. also a saturo fan btw

    • @YourLocalEditzz
      @YourLocalEditzz ปีที่แล้ว

      How do u rename?

  • @thatidiotoverthere6311
    @thatidiotoverthere6311 ปีที่แล้ว +29

    Finally I understand animations events, and they’re just what I need! Amazing tut man, earned a sub for sure!

    • @stanleymiles2693
      @stanleymiles2693 10 หลายเดือนก่อน +2

      yo how to create the animation event thing

    • @seadrown6252
      @seadrown6252 10 หลายเดือนก่อน

      left click and press insert object then select 'animation' or 'animator' or whatever you need@@stanleymiles2693

    • @Fudilitos
      @Fudilitos 7 หลายเดือนก่อน

      M2 click on the area where you put the key frame and click on "add event on here" or something like that

  • @your_local_Turkish31
    @your_local_Turkish31 ปีที่แล้ว +124

    "whats your special talent?"
    "typing in light speed."

    • @GamingScripter
      @GamingScripter 11 หลายเดือนก่อน +3

      What did you missed? Him editing the speed

    • @Frim_ms
      @Frim_ms 10 หลายเดือนก่อน

      💀

    • @Ghost.1-z5l
      @Ghost.1-z5l 8 หลายเดือนก่อน

      AHHAHAHA

    • @Jamal1_56
      @Jamal1_56 7 หลายเดือนก่อน

      just slow the video speed and ur good 🦕🦕

    • @randomdi0
      @randomdi0 6 หลายเดือนก่อน

      real

  • @genuinegoofball097
    @genuinegoofball097 ปีที่แล้ว +5

    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

  • @coreclams40312
    @coreclams40312 ปีที่แล้ว +9

    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
      @Literally_Kirby 9 หลายเดือนก่อน

      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

  • @KuyaYe
    @KuyaYe ปีที่แล้ว +60

    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

    • @AwzPlayZ
      @AwzPlayZ 5 หลายเดือนก่อน

      Same!

  • @Goofy_Hexer
    @Goofy_Hexer ปีที่แล้ว +27

    Thank you so much bro im working on a battleground game right now and this is helping me out A LOT

  • @aledcaa5036
    @aledcaa5036 ปีที่แล้ว +7

    I was here before 100 views. I know, this video will be kinda popular. So im old tomato’s fan!

  • @PurpNite-fb7ny
    @PurpNite-fb7ny 9 หลายเดือนก่อน +2

    goated vid it helped me so much for my game

  • @brennonhunter-chamberlain6995
    @brennonhunter-chamberlain6995 9 หลายเดือนก่อน +4

    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.

  • @zuzustarboy
    @zuzustarboy ปีที่แล้ว +22

    ayo, very fire video man! Keep up the good work :]

  • @Veas_0000
    @Veas_0000 6 หลายเดือนก่อน +25

    local player = game.Players.LocalPlayer
    local character = player.Character or player.CharacterAdded:Wait()
    local humanoid = character:WaitForChild("Humanoid")
    local userInputService = game:GetService("UserInputService")
    local dashDistance = 50
    local dashCooldown = 1
    local lastDash = 0
    local function dash(direction)
    if tick() • lastDash >= dashCooldown then
    local rootPart = character:WaitForChild("HumanoidRootPart")
    local dashVector = rootPart.CFrame.LookVector * direction.Z + rootPart.CFrame.RightVector * direction.X
    rootPart.Velocity = dashVector * dashDistance
    lastDash = tick()
    end
    end
    userInputService.InputBegan:Connect(function(input, gameProcessed)
    if gameProcessed then return end
    if input.KeyCode == Enum.KeyCode.W then
    dash(Vector3.new(0, 0, -1))
    elseif input.KeyCode == Enum.KeyCode.S then
    dash(Vector3.new(0, 0, 1))
    elseif input.KeyCode == Enum.KeyCode.A then
    dash(Vector3.new(-1, 0, 0))
    elseif input.KeyCode == Enum.KeyCode.D then
    dash(Vector3.new(1, 0, 0))
    end
    end)

    • @BartoszwirTT
      @BartoszwirTT 4 หลายเดือนก่อน +3

      I love you.

    • @SatoruGojo7963
      @SatoruGojo7963 3 หลายเดือนก่อน +2

      thanks bro.

    • @NubbThunder
      @NubbThunder 3 หลายเดือนก่อน

      Is it for the combat client or combat server

    • @GoofyRBX-k9p
      @GoofyRBX-k9p 3 หลายเดือนก่อน

      @@NubbThunder client

    • @sanaazmalaysia2128
      @sanaazmalaysia2128 หลายเดือนก่อน +1

      @@BartoszwirTT YOU LOVE ***?

  • @abc123-00
    @abc123-00 11 หลายเดือนก่อน +2

    GREAT VIDEO KEEP UP THE WORK!

  • @Car_demon87
    @Car_demon87 11 หลายเดือนก่อน +42

    why doesnt it work?

    • @T-Topsan
      @T-Topsan 9 หลายเดือนก่อน +2

      What’s the matter

    • @Car_demon87
      @Car_demon87 9 หลายเดือนก่อน

      @@T-Topsan so basically i used the script like he told me and other shit and when i tried it didnt work like wtf

    • @josephvacco8790
      @josephvacco8790 9 หลายเดือนก่อน +2

      @@Car_demon87you didn’t copy something right

    • @Iraisedyou
      @Iraisedyou 9 หลายเดือนก่อน +1

      You probably had it under a “normal script” instead of “local script”

    • @baalen_official
      @baalen_official 9 หลายเดือนก่อน +1

      Yes

  • @Surfer_1
    @Surfer_1 3 หลายเดือนก่อน

    Helped me out so much you deserve the support.

  • @DeathOnce
    @DeathOnce ปีที่แล้ว +3

    hey I need help I'm getting the error "Infinite yield possible on 'ReplicatedStorage:WaitForChild("Remotes")" what can I do to fix this?

    • @floppuhh
      @floppuhh ปีที่แล้ว

      you spelt the Remotes folder wrong

    • @1LightZ7
      @1LightZ7 ปีที่แล้ว

      @@floppuhh no its spelled right i have the same issue but its with module

    • @thatoneguyeveryonehates789
      @thatoneguyeveryonehates789 11 หลายเดือนก่อน

      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.

    • @floppuhh
      @floppuhh 11 หลายเดือนก่อน

      @@1LightZ7 then the folder is on wrong location

    • @1LightZ7
      @1LightZ7 11 หลายเดือนก่อน

      @@floppuhh very helpful -_-

  • @moviecentrul
    @moviecentrul ปีที่แล้ว +2

    can someone help me, i did the script and stuff but It Still Only Plays 1 animation

    • @bulitin2434
      @bulitin2434 10 หลายเดือนก่อน

      me too

    • @WormyGerber
      @WormyGerber 26 วันที่ผ่านมา

      @@bulitin2434 you guys play a animation?

  • @NeonForever
    @NeonForever ปีที่แล้ว +2

    So satisfying watching somebody code

  • @denominatorman
    @denominatorman ปีที่แล้ว +2

    beautiful. peak art. unbearably incredible.

  • @Classictrono
    @Classictrono 9 หลายเดือนก่อน +7

    1:58 what if I don’t have a numpad?

    • @RoverBG
      @RoverBG 4 หลายเดือนก่อน +1

      God knows brotha

    • @FriedFoxRoblox
      @FriedFoxRoblox 4 หลายเดือนก่อน

      u can use any 7 on ur keyboard u dont need to use numpad 7

  • @dannyruffin2618
    @dannyruffin2618 ปีที่แล้ว +1

    Man bro your amazing,I can’t even animate but now I’ll try, thanks

  • @Baolapao
    @Baolapao ปีที่แล้ว +8

    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
      @KC1598-ll3nr ปีที่แล้ว +1

      How to I rename

    • @EveryReaper
      @EveryReaper ปีที่แล้ว

      i think almost every animator has the event thing, unless you're doing it outside roblox studio

  • @UTENSILS483
    @UTENSILS483 ปีที่แล้ว +2

    what do i do when this eror pops up Infinite yield possible on 'ServerStorage:WaitForChild("Modules")'

    • @Sansicmp
      @Sansicmp ปีที่แล้ว

      same problem 😭😭😭😭

    • @UTENSILS483
      @UTENSILS483 ปีที่แล้ว

      😭😭😭😭😭😭😭😭@@Sansicmp

    • @Sansicmp
      @Sansicmp ปีที่แล้ว

      @@UTENSILS483 I found out why, u gotta go through the whole vid and add hitbox 😭

    • @Xcandy-f3c
      @Xcandy-f3c 5 หลายเดือนก่อน

      i dont think its need to be "Modules" i think its need to be "Models"

  • @mal._hii
    @mal._hii 2 หลายเดือนก่อน +4

    local rp = game:GetService("ReplicatedService")
    local remotes = rp:WaitForChild("Remotes")
    local animations = rp:WaitForChild("Animations")
    local punchRemotes = remtoes:WaitForChild("Punch")
    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 currAnims = punchAnims[combo]
    return currAnims
    end
    punchRemote.OnServerEvent:(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)
    local playPunchAnim = hum:LoadAnimation(getPunchAnim(char))
    playPunchAnim.KeyFrameReached:Connect(function(kf)
    if kf == "Hit" then
    char:SetAttribute("Attacking") , false)
    if char:GetAttrivute("Combo") == MAX_COMBO then
    task:wait(1)
    end
    char:SetAttribute("Punch" , false)
    end
    end)
    playPunchAnim:Play()
    end)

  • @aaaeebaaee
    @aaaeebaaee ปีที่แล้ว

    i did everything right and still doesnt work, the only thing that is different is the output chat thing. i dont have that, how do i get the output chat thing to like say something when it launches

    • @saucerv2425
      @saucerv2425 ปีที่แล้ว +1

      press view and output

    • @aaaeebaaee
      @aaaeebaaee ปีที่แล้ว

      @@saucerv2425 i feel stupid for not knowing that
      i found what the error was it says Infinite yield possible on 'Workspace.aaaeebaaee:WaitForChild("humanoid")'

    • @dester1902
      @dester1902 ปีที่แล้ว

      @@aaaeebaaee replace 'humanoid' to 'Humanoid'

  • @Bacon9123
    @Bacon9123 ปีที่แล้ว +3

    Hey, i got a question for you, how did you reflect the animation 1 and 2?

    • @TheRookieFan15
      @TheRookieFan15 ปีที่แล้ว

      moon animator has it

    • @TLWM111
      @TLWM111 ปีที่แล้ว

      @@TheRookieFan15 whats the keybind

    • @randoAnim
      @randoAnim ปีที่แล้ว

      @@TLWM111 control r

    • @TLWM111
      @TLWM111 ปีที่แล้ว

      @@randoAnim I already know it now, But thanks mate

  • @arthurlebedev9848
    @arthurlebedev9848 ปีที่แล้ว +2

    VERY GOOD ANIMATION I JUST LOVE IT🤩

  • @PAN1K572
    @PAN1K572 ปีที่แล้ว +8

    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

    • @opukich
      @opukich ปีที่แล้ว

      Same

    • @Angel-fl6gl
      @Angel-fl6gl ปีที่แล้ว

      still nobody knows how to fix it?@@opukich
      i also have this trouble Touched is not a valid member of Model "Workspace.Model.Model".
      i did absoulutely all right..

    • @improbablyboredrn123
      @improbablyboredrn123 ปีที่แล้ว

      what error are you getting

    • @PAN1K572
      @PAN1K572 ปีที่แล้ว +1

      ok so idk how but i made it work!!!!!!!!
      all i need now is just a slower cooldown

    • @Antho_Draw
      @Antho_Draw 5 หลายเดือนก่อน

      @@PAN1K572 HOOOOOOOOWWWW

  • @sairo_qx
    @sairo_qx 11 หลายเดือนก่อน +1

    Bro i just COPIED all the scripts but combat system dont working((

  • @kronic_energy
    @kronic_energy ปีที่แล้ว +10

    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
      @imsiliconicbull1404 8 หลายเดือนก่อน

      Im pretty sure thats combat server?

    • @xKoziexII
      @xKoziexII 8 หลายเดือนก่อน

      why is it so delayed

    • @BartoszwirTT
      @BartoszwirTT 4 หลายเดือนก่อน

      can u write the first script ? thanks

  • @samiro90_official
    @samiro90_official 11 หลายเดือนก่อน +2

    very understandable and helpfull! Tysm

  • @sqi_d
    @sqi_d ปีที่แล้ว +62

    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
      @choFu31 ปีที่แล้ว +4

      thanks dude

    • @sqi_d
      @sqi_d ปีที่แล้ว +2

      @@choFu31 no problem!

    • @dejv9427
      @dejv9427 ปีที่แล้ว +2

      my character is not able to punch, idk why tho
      @@sqi_d

    • @Dohruu
      @Dohruu ปีที่แล้ว

      you need to create animation@@dejv9427

    • @АртемПаблович
      @АртемПаблович ปีที่แล้ว +2

      Infinite yield possible on 'ServerStorage:WaitForChild("Modules")' , how to fix this problem?

  • @LizaHsb-j2q
    @LizaHsb-j2q 3 หลายเดือนก่อน

    Props to this guy, I watched the entire vid and I dont even have Roblox studio

  • @Glitcheey
    @Glitcheey ปีที่แล้ว +9

    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
      @pulograin ปีที่แล้ว +3

      Send your server script

    • @YOSTUDIOS45
      @YOSTUDIOS45 ปีที่แล้ว

      same

    • @JozinZeBazin
      @JozinZeBazin ปีที่แล้ว

      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
      @Glitcheey ปีที่แล้ว

      @@JozinZeBazin Yeah that's not the problem. TomatoHitbox is just the name of the module, it has no connections to any username

    • @NarutoKinnie_Yt
      @NarutoKinnie_Yt 11 หลายเดือนก่อน

      @@pulograinhey I need help, when I put animations on the 20th scetence on combat server it says “unknown global user”

  • @neonberon52
    @neonberon52 7 หลายเดือนก่อน

    You saved alot of my time. Thanks for your hitbox system.

  • @MVPadminsbg
    @MVPadminsbg 5 หลายเดือนก่อน +8

    the script for the comabatserver code is not there so here
    local rp = game:GetService("ReplicatedStorage")
    local remotes = rp:WaitForChild("Remotes")
    local animations = rp:WaitForChild("Animations")
    local punchRemote = remotes:WaitForChild("Punch")
    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 punchAnims = animations:WaitForChild("Combat"):GetChildren()

    local currAnim = punchAnims[combo]

    return currAnim
    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:GetAttribute("Attacking",true)
    char:GetAttribute("Punch",true)

    changeCombo(cahr)


    local playPunchAnim = hum:LoadAniamtion(getPunchAnim(char))

    playPunchAnim:Play()

    end)

    • @ZeonTVs
      @ZeonTVs 5 หลายเดือนก่อน +2

      you are the goat bro, TYSM
      ❤❤

    • @Fariza888
      @Fariza888 5 หลายเดือนก่อน

      in 27th line it sayin "Expected identifier when parsing variable name, got '.'" i cant fix this help

    • @frykozxxx
      @frykozxxx 4 หลายเดือนก่อน

      CombatClient

    • @The_Terminator_X
      @The_Terminator_X 2 หลายเดือนก่อน

      @@Fariza888 same here

    • @Curtis_editz
      @Curtis_editz 2 หลายเดือนก่อน

      doesnt work 😢

  • @gold-egaming
    @gold-egaming ปีที่แล้ว +2

    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?

  • @Cristianogoat2009
    @Cristianogoat2009 ปีที่แล้ว +15

    tomato can you please make it a public model so we can use it right away it would be really helpful
    thanks.

    • @MaskedManStraw
      @MaskedManStraw ปีที่แล้ว +5

      Lazy.

    • @yellowboi2879
      @yellowboi2879 ปีที่แล้ว +2

      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

  • @reyrey_X2
    @reyrey_X2 7 หลายเดือนก่อน

    For the animation is it essential to remove the legs keyframe as my animation has the character kicking the opponent away

  • @ilteris3887
    @ilteris3887 ปีที่แล้ว +359

    i cant punch

  • @stevenchandra6602
    @stevenchandra6602 ปีที่แล้ว

    what do you press to rotate and move a body part for your dummy in animation editor?

  • @rerheel4600
    @rerheel4600 7 หลายเดือนก่อน +5

    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)

    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)

    • @TheLowest
      @TheLowest 5 หลายเดือนก่อน

      TYSM

  • @WeebGround
    @WeebGround 10 หลายเดือนก่อน +1

    for some reason it doesnt work for me....
    i used normal roblox animator

    • @PyExpress
      @PyExpress 3 หลายเดือนก่อน

      Rename the keyframes to Hit

  • @liamaumareva6278
    @liamaumareva6278 10 หลายเดือนก่อน

    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.

  • @rip_tihttt9580
    @rip_tihttt9580 ปีที่แล้ว +2

    how u move hand btw? i cant move it

    • @magcake_
      @magcake_ 11 หลายเดือนก่อน

      while animating click R

  • @JonathanArias-x3z
    @JonathanArias-x3z ปีที่แล้ว +1

    at 9:10 i try to punch and it gave me a error call LoadAnimation requires the asset id to not be empty what do i do? (nvm i fix it)

    • @whoisthisrawn
      @whoisthisrawn ปีที่แล้ว

      how did you fix it i need help with that

  • @GamalAldinYT
    @GamalAldinYT 8 หลายเดือนก่อน

    i use reguler animation editor soooo how to use animations events?

  • @BadLiarRRGT
    @BadLiarRRGT ปีที่แล้ว +2

    can you PLEASE make it so the pastebin scripts have the finished result. because the main doesnt have the saem script as in the video.

  • @V2_The_Machine
    @V2_The_Machine ปีที่แล้ว +2

    yeah but, what if you dont have a group (3:59)

  • @hyperfx0636
    @hyperfx0636 ปีที่แล้ว +2

    How did you make the 2nd punch mirror like that?

  • @Zer0Ntp
    @Zer0Ntp ปีที่แล้ว +2

    Hello! I don't like hitboxes but i like your work, so can you make without hitboxes?

    • @slowpurplealien
      @slowpurplealien ปีที่แล้ว

      You can do ontouch with the enemyhum

  • @JUZE_Music
    @JUZE_Music ปีที่แล้ว +1

    Can I use the first animation and like make it twice? (Explaining: 1 click Punch1 2 click Punch2 3 click Punch1 4 click Punch3
    )

  • @devinairbharatnatyam
    @devinairbharatnatyam 8 หลายเดือนก่อน +1

    if you are using the roblox editor, how do you 'export' the animation?

    • @kxxdxn
      @kxxdxn 6 หลายเดือนก่อน

      Publish to Roblox

  • @DiamondsRulesPower
    @DiamondsRulesPower ปีที่แล้ว +1

    I got a slight problem any help I'd appreciate but for some reason I can't punch I set it to R6 I put in the scripts and stuff can anyone help out?

  • @YourFriendGlitched
    @YourFriendGlitched ปีที่แล้ว +1

    im getting an error called "Infinite yield possible on 'ServerStorage:WaitForChild("Modules")'

    • @bebra3392
      @bebra3392 ปีที่แล้ว

      create a folder named Modules and put the module into it

    • @ASpectorVloid
      @ASpectorVloid 11 หลายเดือนก่อน

      what module
      @@bebra3392

  • @TheVrother17
    @TheVrother17 11 หลายเดือนก่อน

    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.

  • @coryx1d
    @coryx1d 4 หลายเดือนก่อน

    im going to work on this little by little everyday it looks really good! I'll keep updated.

  • @Svetevev
    @Svetevev ปีที่แล้ว

    Why did you play animation on server and not client?

  • @MRC9277
    @MRC9277 10 หลายเดือนก่อน

    Ty man now my and my friend can develop our battlegrounds game

  • @novaniroblox
    @novaniroblox 10 หลายเดือนก่อน +1

    i did everything you did but for some reason it just doesn't punch, can u tell me why?

  • @Angel-fl6gl
    @Angel-fl6gl ปีที่แล้ว

    BRO TYYYY VERY MUCH YOU JUST SAVING MY PROJECT'S LIFE

  • @fireblade-cp8uw
    @fireblade-cp8uw ปีที่แล้ว +2

    at 0:30 you put something in ServerStorage but cut out whatever you put in, what was it? Cause I think it's something to do with Modules in the code that may be missing from when I started trying to mimic this tutorial step by step. It says that I'm missing Modules, didn't say it in my step by step re-creation. But when I made a second place to try and copy/paste the released scripts w/the same setup to see if that could fix my earlier issue, it gave me that error. And I realized there's nothing in my Server Storage on either place but there's something in yours

    • @fireblade-cp8uw
      @fireblade-cp8uw ปีที่แล้ว +1

      Aight. I've spent more than 6 hours on just this single 10 minute video. This one ain't for me chief,

    • @SetYourSpike_Gaming-wl5le
      @SetYourSpike_Gaming-wl5le ปีที่แล้ว

      @@fireblade-cp8uw have you put the TomatoHitbox in the ServerStorage?
      and u need to make a folder named "Modules" then put the TomatoHitbox in

    • @moviecentrul
      @moviecentrul ปีที่แล้ว

      It Was Just Moon Animator Files😭

  • @MatasDa
    @MatasDa 9 หลายเดือนก่อน

    what is the animation priority?🤔🤔🤔

  • @thatduckyinthewindow
    @thatduckyinthewindow 7 หลายเดือนก่อน

    Could I use blender instead of moon animator?

  • @owenrossier3500
    @owenrossier3500 ปีที่แล้ว

    i kinda made one animation that has everything that it more better then this does that change anything?

  • @dusksroboticsandentertainm822
    @dusksroboticsandentertainm822 ปีที่แล้ว +2

    Can you do a part 3 for abilities and adding new characters?

  • @cvit78
    @cvit78 9 หลายเดือนก่อน

    How do you get that thing in start that board you need.where up you get it?

  • @МаксимГриненко-п9ж
    @МаксимГриненко-п9ж 5 หลายเดือนก่อน

    soo for me, it plays only 1 animation without hitbox and i did all the fixed that you provided in video, maybe there is a problem with events but i made an event called Hit, idk whats the reason

  • @StrayDaMaster
    @StrayDaMaster 6 หลายเดือนก่อน

    question, can you make a tutorial for adding: swords, aura's,... to the animations?

  • @casha1488
    @casha1488 ปีที่แล้ว +1

    Hi, this doesn't work.
    My character only deals 1 hit and that's it.

  • @shv3la_787
    @shv3la_787 ปีที่แล้ว +1

    Gow u export pls tell me

  • @alligatorgamer3356
    @alligatorgamer3356 4 หลายเดือนก่อน

    im having a problem with the animation not playing it just gives me an error that says ''LoadAnimation requires an Animation object''

  • @geloyellow7888
    @geloyellow7888 10 หลายเดือนก่อน +1

    i edited the game in studio and the punching walking dashing and basically any animation doesnt work and i didnt mess with anything i just clicked edit in studio and tried the game and then well the animations didnt work. please fix this thank you and have a good day :)

  • @TsbgGuy
    @TsbgGuy 9 หลายเดือนก่อน

    Yo Great vid but can you use the roblox animation for me? I dont know how to use the moon/blender animator

  • @foghanima
    @foghanima 2 หลายเดือนก่อน

    bro, how do i create a animation event in the normal animation editor ?

  • @naiqiza
    @naiqiza 10 หลายเดือนก่อน

    U can animate it with the video right for animation

  • @piececontrolKRM
    @piececontrolKRM ปีที่แล้ว

    How did you get the graphs on the moon animator

    • @notbread5867
      @notbread5867 ปีที่แล้ว

      you click the keyframe twice

  • @SebosoJr
    @SebosoJr ปีที่แล้ว +2

    Hi i have a problem, i followed all the tutorial but it does only one hit and deals no damage. Can you help me?

  • @Timskat
    @Timskat ปีที่แล้ว +1

    YESSSS TYSM NOW I CAN DO COMBAT SYSTEM IN MY GAME!!!!!!!

  • @EditEditr
    @EditEditr 7 หลายเดือนก่อน +1

    i did this tutuorial and for some reason my punches only come once. Then when im done my 4th punch, i mcant punch anymore

  • @vortexus0
    @vortexus0 ปีที่แล้ว +1

    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!

  • @R4yizmenew
    @R4yizmenew 5 หลายเดือนก่อน

    wat is animatio event using for?

  • @NarutoKinnie_Yt
    @NarutoKinnie_Yt 11 หลายเดือนก่อน +1

    Guys! I need help, when I put animations on the 20th scetence on combat server it says “unknown global user”

  • @lyricalcreepz481
    @lyricalcreepz481 ปีที่แล้ว

    You got yourself a new subscriber

  • @zakiplays6807
    @zakiplays6807 ปีที่แล้ว +1

    why can i only hit once and the hitbox doesnt even show up

  • @Unliminum
    @Unliminum 2 หลายเดือนก่อน

    for some reason i could only play one animation even though i but the script in right? (Please Help)

  • @KiraYoshikage125
    @KiraYoshikage125 10 หลายเดือนก่อน +1

    HOW TO DID EVENT ON BASIC ROBLOX ANIMATION

  • @boltlessOffical
    @boltlessOffical ปีที่แล้ว +2

    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

  • @TheRealKio
    @TheRealKio ปีที่แล้ว

    do you add animation event to every animation or just the first one?

  • @imrtkツ
    @imrtkツ ปีที่แล้ว

    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??

  • @Teth_Yuri
    @Teth_Yuri 10 หลายเดือนก่อน

    Hello, so, for some reason when i punch I get an error on your hitbox: "TomatoHitbox:108: Unable to assign property CFrame.CoordinateFrame expected, got Vector3
    any ways to solve it?

  • @justnison8059
    @justnison8059 9 หลายเดือนก่อน

    im using roblox studio so what do i do when i have to put the stuff in the folders?

  • @Unknown_Iol
    @Unknown_Iol ปีที่แล้ว

    can any body help this is the error im gettng 21:03:12.415 Infinite yield possible on 'ServerStorage:WaitForChild("Modules")'

  • @IAttemptToBeGood
    @IAttemptToBeGood 8 หลายเดือนก่อน

    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

    • @3minations676
      @3minations676 7 หลายเดือนก่อน

      It might be something outside of the code make sure everything is organized like the video

  • @Bunnys-Bakery
    @Bunnys-Bakery 7 หลายเดือนก่อน

    I got only one error and is says " Infinite yield possible on 'ReplicatedStorage:WaitForChild("Punch")'" what does this mean and how can i fix it? And the animations dont play...

  • @ghs_coolman5012
    @ghs_coolman5012 ปีที่แล้ว

    whenever i m1 it plays the animation but at a completely diffrent speed of how i want it to and its alot slower how do i fix that

  • @jester180
    @jester180 8 หลายเดือนก่อน

    what dose the animation event do?