Hey guys! I actually have a slightly more updated version of this combat on my channel now. Please check that out for some updated effects and built in cooldown manager, inventory, and UI!
For anyone whos having a problem on line “89” with the load animation thing, you typed your “rbxassetid” wrong. Or the id numbers itself. I spent like 20 minutes trying to figure it out, but i typed “rbassetid” instead of “rbxassetid” so make sure its spelt correctly!
This is actually help full I like that you dont take like an hour to start, but I have a question, would it be possible that you show how to make a heavy attack combo?
My dummy takes damage, but after I land a hit on it my character slowly starts sliding, using my walk animation. Also this only seems to work for the dummy I have placed, not zombies from a zombie spawner.
script local remote = game.ReplicatedStorage.CombatEvent remote.OnServerEvent:Connect(function(Client, data) if data.Action == "m1" then data.Target.Humanoid:TakeDamage(4) if data.Air == "Up" then local bp = Instance.new("BodyPosition") bp.Position = data.Character.PrimaryPart.Position + Vector3.new(0,30,0) bp.P = 1200 bp.MaxForce = Vector3.new (99999,99999,99999) bp.D = 200 bp.Name = "Position" bp.Parent = data.Character.PrimaryPart game.Debris:AddItem(bp,1) local bp = Instance.new("BodyPosition") bp.Position = data.Target.PrimaryPart.Position + Vector3.new(0,30,0) bp.P = 1200 bp.MaxForce = Vector3.new (99999,99999,99999) bp.D = 200 bp.Name = "Position" bp.Parent = data.Target.PrimaryPart game.Debris:AddItem(bp,1) elseif data.Air == "Down" then for i,v in pairs (data.Target.PrimaryPart:GetChildren()) do if v:IsA("BodyMover") then v:Destroy() end end local bv = Instance.new("BodyVelocity", data.Target.PrimaryPart) bv.Velocity = (data.Character.PrimaryPart.CFrame.LookVector * 1 - Vector3.new(0,2,0)) *25 bv.MaxForce = Vector3.new (99999,99999,99999) bv.Name = "Velocity" game.Debris:AddItem(bv, 2) elseif data.combo == 5 then local bv = Instance.new("BodyVelocity", data.Character.PrimaryPart) bv.Velocity = data.Character.PrimaryPart.CFrame.LookVector * 10 bv.MaxForce = Vector3.new (99999,99999,99999) bv.Name = "Velocity" game.Debris:AddItem(bv, .2) local bv = Instance.new("BodyVelocity", data.Target.PrimaryPart) bv.Velocity = data.Character.PrimaryPart.CFrame.LookVector * 75 bv.MaxForce = Vector3.new (99999,99999,99999) bv.Name = "Velocity" game.Debris:AddItem(bv, 2) else local bv = Instance.new("BodyVelocity", data.Character.PrimaryPart) bv.Velocity = data.Character.PrimaryPart.CFrame.LookVector * 10 bv.MaxForce = Vector3.new (99999,99999,99999) bv.Name = "Velocity" game.Debris:AddItem(bv, .2) local bv = Instance.new("BodyVelocity", data.Target.PrimaryPart) bv.Velocity = data.Character.PrimaryPart.CFrame.LookVector * 10 bv.MaxForce = Vector3.new (99999,99999,99999) bv.Name = "Velocity" game.Debris:AddItem(bv, .2) end end end) local script local character = script.Parent local humanoid = character.Humanoid local player = game.Players.LocalPlayer local uis = game:GetService("UserInputService") local remote = game.ReplicatedStorage.CombatEvent local lastTimeM1 = 0 local lastM1End = 0 local combo = 1 local canAir = true local punchAnims = { 'rbxassetid://17492488859',--1 'rbxassetid://17492518101',--2 'rbxassetid://17521633578',--3 'rbxassetid://17521583383',--4 'rbxassetid://17494314786',--5 } local airAnims = { 'rbxassetid://17494408689', --Kick Up 'rbxassetid://17494373805', --Kick Down } local function hb(size, cframe, ignore, char) local hb = Instance.new("Part", workspace.Fx) hb.Anchored = true hb.CanCollide = false hb.Transparency = .6 hb.Name = "hb" hb.Material = Enum.Material.ForceField hb.CanQuery = false hb.Size = size hb.CFrame = cframe local con con = hb.Touched:Connect(function() con:Disconnect() end) local lasttarg for i,v in pairs(hb:GetTouchingParts()) do if v.Parent:FindFirstChild("Humanoid") and table.find(ignore, v.Parent) == nil then if lasttarg then if (lasttarg.Position - char.PrimaryPart.Position).Magnitude > (v.Position - char.PrimaryPart.Position).Magnitude then lasttarg = v.Parent.PrimaryPart end else lasttarg = v.Parent.PrimaryPart end end end hb:Destroy() if lasttarg then return lasttarg.Parent else return nil end end uis.InputBegan:Connect(function(input, gpe) if gpe then return end if input.UserInputType == Enum.UserInputType.MouseButton1 and tick() - lastTimeM1 > .3 and tick() - lastM1End > .7 then if tick() - lastM1End > .7 then combo = 1 end lastTimeM1 = tick() local animation = Instance.new("Animation", workspace.Fx) local air = nil if uis:IsKeyDown("Space") and combo == 4 and canAir then canAir = false animation.AnimationId = airAnims[1] air = "Up" elseif not uis:IsKeyDown("Space") and combo == 5 and not canAir then animation.AnimationId = airAnims[2] air = "Down" else animation.AnimationId = punchAnims[combo] end local load = humanoid:LoadAnimation(animation) load:Play() animation:Destroy() local hitTarg = hb(Vector3.new(4,6,4), character.PrimaryPart.CFrame * CFrame.new(0,0,-3), {character}, character) if hitTarg then local data = { ["Target"] = hitTarg, ["Character"] = character, ["Combo"] = combo, ["Air"] = air, ["Action"] = "m1", } remote:FireServer(data) end
if combo == #punchAnims then combo = 1 lastM1End = tick() else combo += 1 end humanoid.WalkSpeed = 0 wait(.4) humanoid.WalkSpeed = 16 end end) humanoid.StateChanged:Connect(function(old, new) if new == Enum.HumanoidStateType.Landed then canAir = true end end) uis.JumpRequest:Connect(function() if tick() - lastTimeM1 < 1 then humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false) else humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, true) end end)
This is so helpful thank you so much I have been looking for a tutorial for a long time. I have a suggestion is it possible that you show how to make a combo counter?
does it matter when i changed the player char and humanoid to this?: local player = game.Players.LocalPlayer local char = player.CharacterAdded:Wait() local humanoid = char:WaitForChild("Humanoid")
i dont know why but the dummy does not take damage i think the problem is in the function parameters data so it might think that when i say something like data.Action its reffering to the parameter but when i remove the parameter it still doesnt work if u have a discord or some way you could help me that would be great cause i repeated ur video like a million times and still never works and ive been finding it quit frustrating
in output it keeps saying "Workspace.(my user).LocalScript:47: invalid argument #1 to 'find' (table expected, got Instance)" and the code at line 47 is: 46 for i, v in pairs(hb:GetTouchingParts()) do 47 if v.Parent:FindFirstChild("Humanoid") and table.find(ignore, v.Parent) == nil then 48 if lasttarg then i could need some help with this
i tried this with R6 which worked fine but when i punched the dummy, walked and punched, jumped and punched, the animations got canceled out instead of playing like they normally do
So I did everything you told me to do/write in the script/local script & other details but it seems to be broken. For some reason I can't do any damage, and when I click to attack it only does 1 animation. I don't know why even though I followed all the steps and stuff, the local script & script seem to be fine. (Please Reply)
line 49 of the code, for me, i had to change to: if (lasttarg.Position - char.PrimaryPart.Position).Magnitude > (v.Position - char.PrimaryPart.Position).Magnitude then
I'm having a little bit of trouble on line 49 of the local script. The output says "attempt to compare Vector3 < number" Here's what the code looks like on my end: local lasttarg
for i, v in pairs(hb:GetTouchingParts()) do if v.Parent:FindFirstChild("Humanoid") and table.find(ignore, v.Parent) == nil then if lasttarg then if (lasttarg.Position - char.PrimaryPart.Position).Magnitude > (v.Position - char.PrimaryPart.Position) then lasttarg = v.Parent.PrimaryPart end else lasttarg = v.Parent.PrimaryPart end end Any help would be great
@@raysthd5037 if input.UserInputType == Enum.UserInputType.MouseButton1 and tick() - lastTimeM1 > .4 and tick() - lastTimeM1 > 0.6 and character:FindFirstChild("ClassicSword") then replace classicsword with the tool name you want
Hi, my output is giving me this error: Workspace.s4lmonella.LocalScript:49: attempt to compare Vector3 < number My code on lines 49 and 50 looks like this: if (lasttarg.Position - char.PrimaryPart.Position).Magnitude > (v.Position - char.PrimaryPart.Position) then lasttarg = v.Parent.PrimaryPart Could this be an issue with R6 or is there some other problem with the code? Thanks in advance if you do help, and even if you don't, this was a great tutorial.
Isn't this very easily exploitable? You are letting the client fire a remote event that handles vulnerable data like the target, character, combo, air and action.
@wiztash9530 you would have to make the hitboxes on the server along with all the other important things like the target, character, combo air, action like he listed then you would just fire a remote event to the client just to make the effects
This does work with R6/r6. You just have to replace every part that uses PrimaryPart to HumanoidRootPart and it should work, since R6 dummies apparently don't have a PrimaryPart. Hope that helps!
I have an error called: "Workspace.robloxinatorALi123.CombatClient:50: invalid argument #1 to 'find' (table expected, got Instance)", i wrote "if v.Parent:FindFirstChild("Humanoid") and table.find(ignore, v.Parent) == nil then" on that line, like in the video, whats wrong?
on line 56 and says Expected identifer and same with the == nil then on line 58 and 59 both lasttarg’s say Unknown global lasttarg line 64 to line 114 everything says Unreachable code (previous statement always returns
why dosen't the data.Air == "Up" work in the script? when i do the up combo nothing happens and same with the down one, and the animation thingy dosent work?
Hello, my animations and codes are completely ready, but even though my character enters the uptilt animation, it does not go up and the puppet does not go up either.
for some reason my m1s don work i copy pasted everything to the letter and me and my friends we also tried other peoples guides bu they didnt work either can someone help plzzz
So I'm pretty sure that I have done everything correctly I have even double checked but for some reason when I click it does nothing, I have gone through the ENTIRE code and still can't find the problem
@@realampro wdym? Also I manage to make it play the animation and summon the hit box but it plays only the first punch anim(even with the change you made) and it doesn't do any damage
on line 5 of the server script where it says "data.Target.Humanoid:TakeDamage(4)" when i test it, it says attemt to index with nil "Humanoid" how can i fix this?
should the animation only contain the punch or should i also make the arm come back to its original position and where should we start the second punch animation?
I have a problem i closed the tab where i can allow it after pressing on setup. I already tried deinstalling it and reinstalling it but it didnt work. How can you fix this?
im pretty sure i did all the code correctly but even with after i fixed the combo not starting bug, it still wont start the combo. Does anyone know how to fix this?
I'm trying the scripts but my animations won't run and the errors are saying Humanoid is not a valid member of "ServerScriptService" - Script:2 And OnServerEvent can only be used on server - LocalScript:3 Please help urgently😅😅
Could you please put the scrip in the descrition please i dnt have time t copy ll of this and trust me im making the best upcoming roblox game and really needed this comabt system i love the way it work and think this would be better than all of my coding combined. I know this is an old video but im still wondering
there is some things i can do to make the system the way i prefer it to work, like instead of m1 x 5, it's m1 x 4 like in most battlegrounds games, and the other things i can just be figuring out.
My animations doesn't work properly when i attack dummies. I guess when i hit a dummy i get velocity and move forward, but because of that walk animation starts playing and it conflicts with my punching animations... i think. How do i fix it?
All good for me except for a few little parts local lasttarg
for i, v in pairs(hb:GetTouchingParts()) do if v.Parent:FindFirstChild("Humanoid") and table.find(ignore, v.Parent) == nil then if lasttarg then if (lasttarg.Position - char.PrimaryPart.Position).Magnitude > (v.Position - char.PrimaryPart.Position).Magnitude then lasttarg = v.Parent.PrimaryPart end else lasttarg = v.Parent.PrimaryPart end end I don't really understand this lasttarg thingy, can somebody elaborate please
can you make this into a model!!!! :D I would make following this a lot easier because maybe I'm dumb or my computer is old but I keep running into errors and I'm no sure what I'm missing
Doesn't work, line 101 remote is underlined blue and dont know how to fix and and line 122 - 128 are all under lined red as an error fr wastwe a hole 3hrs
My animations are only playing a third of what they should be... Also, the dummy won't take damage or knock back. Does anyone have ideas of where I messed up?
Can you please tech us/ me how to put this in a slot like press 1 to activate combat in hotbar then u can use it or skills that u have to press 2 like flash step before u can use z
you can do this using tools and adding the local script to it but you will need to change the code a bit because you need to detect if the player have the tool equiped and then use the move something like this: local tool = script.Parent tool.equiped:Connect(function() equiped = true end) tool.unequiped:Connect(function() equiped = false end) uis.ImputBegan:Connect(function(input, gpe) if gpe then return end if input.UserImputType == Enum.UserImputType.MouseButton1 and equiped = true then --all the other things in the script
hey bro can i get some help i wanna know how to get the combat working but no air stuff i can into a animation loading issue and i hope some one can help me out with this? it has to do with the part where its the if statement about air combo animation. thanks
Hey guys! I actually have a slightly more updated version of this combat on my channel now. Please check that out for some updated effects and built in cooldown manager, inventory, and UI!
can u put the animatione on the comment i don't have one please 😊
please 🙏🙏🙏🙏🙏
@@omarbensaad5755 use the animation spoofer plugin.
can you send a like to th video?
could you add the animation ids?
Worth the wait I swear u never miss wit these tutorials
definitely gonna watch this after i finish my own combat system to see what i can improve. Thanks for the open source learning code
For anyone whos having a problem on line “89” with the load animation thing, you typed your “rbxassetid” wrong. Or the id numbers itself. I spent like 20 minutes trying to figure it out, but i typed “rbassetid” instead of “rbxassetid” so make sure its spelt correctly!
do i have to make my own anims or do i have to use his
@@nichkhar1508 you don't need to make one yourself but you can if you want
@@renielconcepcion6388 you have to now, you cannot use anims you don't own and unfortunetly the person who made these anims have them privated.
still doesnt work
bro can you tell me why it doesn't work for me? Please
THANKS ALOOTT!!! i was wondering how to make a air combo and stuff and this really helped :)
This is actually help full I like that you dont take like an hour to start, but I have a question, would it be possible that you show how to make a heavy attack combo?
I learnt a lot from this thanks!!
its crazy how u made a whole combat system within 20 minutes nice
Bruv, its 21 minutes and 41 seconds.
@@Terrifying fr thats what im saying kids dont know how to read these days
@Redacted @A-top Gaming it actually only goes to 21 minutes and 40 seconds, sometimes youtube does an oopsie and adds an extra 1. :)
@@a-topgaming7366 exactly
@@Terrifying i was estimating lmfao i already know its 21 minutes
My dummy takes damage, but after I land a hit on it my character slowly starts sliding, using my walk animation. Also this only seems to work for the dummy I have placed, not zombies from a zombie spawner.
Make sure you delete the bodyvelocity object you create in the server script using game.Debris:AddItem(bv, .2) Prob around line 137
do the zombies have a humanoid?
hey by any chance could you make some sort of parry tutorial with blocking, I am having trouble figuring it out my self…💀
Bro went "i'm gonna make a tutorial series on this subject, but you guys could probably figure that out on your own"
script
local remote = game.ReplicatedStorage.CombatEvent
remote.OnServerEvent:Connect(function(Client, data)
if data.Action == "m1" then
data.Target.Humanoid:TakeDamage(4)
if data.Air == "Up" then
local bp = Instance.new("BodyPosition")
bp.Position = data.Character.PrimaryPart.Position + Vector3.new(0,30,0)
bp.P = 1200
bp.MaxForce = Vector3.new (99999,99999,99999)
bp.D = 200
bp.Name = "Position"
bp.Parent = data.Character.PrimaryPart
game.Debris:AddItem(bp,1)
local bp = Instance.new("BodyPosition")
bp.Position = data.Target.PrimaryPart.Position + Vector3.new(0,30,0)
bp.P = 1200
bp.MaxForce = Vector3.new (99999,99999,99999)
bp.D = 200
bp.Name = "Position"
bp.Parent = data.Target.PrimaryPart
game.Debris:AddItem(bp,1)
elseif data.Air == "Down" then
for i,v in pairs (data.Target.PrimaryPart:GetChildren()) do
if v:IsA("BodyMover") then
v:Destroy()
end
end
local bv = Instance.new("BodyVelocity", data.Target.PrimaryPart)
bv.Velocity = (data.Character.PrimaryPart.CFrame.LookVector * 1 - Vector3.new(0,2,0)) *25
bv.MaxForce = Vector3.new (99999,99999,99999)
bv.Name = "Velocity"
game.Debris:AddItem(bv, 2)
elseif data.combo == 5 then
local bv = Instance.new("BodyVelocity", data.Character.PrimaryPart)
bv.Velocity = data.Character.PrimaryPart.CFrame.LookVector * 10
bv.MaxForce = Vector3.new (99999,99999,99999)
bv.Name = "Velocity"
game.Debris:AddItem(bv, .2)
local bv = Instance.new("BodyVelocity", data.Target.PrimaryPart)
bv.Velocity = data.Character.PrimaryPart.CFrame.LookVector * 75
bv.MaxForce = Vector3.new (99999,99999,99999)
bv.Name = "Velocity"
game.Debris:AddItem(bv, 2)
else
local bv = Instance.new("BodyVelocity", data.Character.PrimaryPart)
bv.Velocity = data.Character.PrimaryPart.CFrame.LookVector * 10
bv.MaxForce = Vector3.new (99999,99999,99999)
bv.Name = "Velocity"
game.Debris:AddItem(bv, .2)
local bv = Instance.new("BodyVelocity", data.Target.PrimaryPart)
bv.Velocity = data.Character.PrimaryPart.CFrame.LookVector * 10
bv.MaxForce = Vector3.new (99999,99999,99999)
bv.Name = "Velocity"
game.Debris:AddItem(bv, .2)
end
end
end)
local script
local character = script.Parent
local humanoid = character.Humanoid
local player = game.Players.LocalPlayer
local uis = game:GetService("UserInputService")
local remote = game.ReplicatedStorage.CombatEvent
local lastTimeM1 = 0
local lastM1End = 0
local combo = 1
local canAir = true
local punchAnims = {
'rbxassetid://17492488859',--1
'rbxassetid://17492518101',--2
'rbxassetid://17521633578',--3
'rbxassetid://17521583383',--4
'rbxassetid://17494314786',--5
}
local airAnims = {
'rbxassetid://17494408689', --Kick Up
'rbxassetid://17494373805', --Kick Down
}
local function hb(size, cframe, ignore, char)
local hb = Instance.new("Part", workspace.Fx)
hb.Anchored = true
hb.CanCollide = false
hb.Transparency = .6
hb.Name = "hb"
hb.Material = Enum.Material.ForceField
hb.CanQuery = false
hb.Size = size
hb.CFrame = cframe
local con
con = hb.Touched:Connect(function()
con:Disconnect()
end)
local lasttarg
for i,v in pairs(hb:GetTouchingParts()) do
if v.Parent:FindFirstChild("Humanoid") and table.find(ignore, v.Parent) == nil then
if lasttarg then
if (lasttarg.Position - char.PrimaryPart.Position).Magnitude > (v.Position - char.PrimaryPart.Position).Magnitude then
lasttarg = v.Parent.PrimaryPart
end
else
lasttarg = v.Parent.PrimaryPart
end
end
end
hb:Destroy()
if lasttarg then
return lasttarg.Parent
else
return nil
end
end
uis.InputBegan:Connect(function(input, gpe)
if gpe then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 and tick() - lastTimeM1 > .3 and tick() - lastM1End > .7 then
if tick() - lastM1End > .7 then
combo = 1
end
lastTimeM1 = tick()
local animation = Instance.new("Animation", workspace.Fx)
local air = nil
if uis:IsKeyDown("Space") and combo == 4 and canAir then
canAir = false
animation.AnimationId = airAnims[1]
air = "Up"
elseif not uis:IsKeyDown("Space") and combo == 5 and not canAir then
animation.AnimationId = airAnims[2]
air = "Down"
else
animation.AnimationId = punchAnims[combo]
end
local load = humanoid:LoadAnimation(animation)
load:Play()
animation:Destroy()
local hitTarg = hb(Vector3.new(4,6,4), character.PrimaryPart.CFrame * CFrame.new(0,0,-3), {character}, character)
if hitTarg then
local data = {
["Target"] = hitTarg,
["Character"] = character,
["Combo"] = combo,
["Air"] = air,
["Action"] = "m1",
}
remote:FireServer(data)
end
if combo == #punchAnims then
combo = 1
lastM1End = tick()
else
combo += 1
end
humanoid.WalkSpeed = 0
wait(.4)
humanoid.WalkSpeed = 16
end
end)
humanoid.StateChanged:Connect(function(old, new)
if new == Enum.HumanoidStateType.Landed then
canAir = true
end
end)
uis.JumpRequest:Connect(function()
if tick() - lastTimeM1 < 1 then
humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
else
humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, true)
end
end)
bro u are a goat but it is the fix version or no ?
This is so helpful thank you so much I have been looking for a tutorial for a long time. I have a suggestion is it possible that you show how to make a combo counter?
I got stuck fore a whole hour stuck bc my animations dont play
does it matter when i changed the player char and humanoid to this?:
local player = game.Players.LocalPlayer
local char = player.CharacterAdded:Wait()
local humanoid = char:WaitForChild("Humanoid")
yes
Nope cuz i did that and it worked
No
where did you copy the animations at 3:38
i dont know why but the dummy does not take damage i think the problem is in the function parameters data so it might think that when i say something like data.Action its reffering to the parameter but when i remove the parameter it still doesnt work if u have a discord or some way you could help me that would be great cause i repeated ur video like a million times and still never works and ive been finding it quit frustrating
Yeah,does it play the animations for because it doesn’t for me
@@Cooldudegamer327 it plays the animations but it just doesnt do damage
@@Cooldudegamer327 where did u store your animations I think that might be the problem
thanks a lot this is way more helpful than anything.
in output it keeps saying "Workspace.(my user).LocalScript:47: invalid argument #1 to 'find' (table expected, got Instance)"
and the code at line 47 is:
46 for i, v in pairs(hb:GetTouchingParts()) do
47 if v.Parent:FindFirstChild("Humanoid") and table.find(ignore, v.Parent) == nil then
48 if lasttarg then
i could need some help with this
🤣
???
@@snowbunnies_69 bro not everyone is good at programming pls explain
Check line 94 if it is: local hitTarg = hb(Vector3.new(4,6,4), character.PrimaryPart.CFrame * CFrame.new(0,0,-3), {character}, character)
check if around line 94 you have
local hitTarg = hb(Vector3.new(4,6,4), character.PrimaryPart.CFrame * CFrame.new(0,0,-3), {character}, character)
i tried this with R6 which worked fine but when i punched the dummy, walked and punched, jumped and punched, the animations got canceled out instead of playing like they normally do
So I did everything you told me to do/write in the script/local script & other details but it seems to be broken. For some reason I can't do any damage, and when I click to attack it only does 1 animation. I don't know why even though I followed all the steps and stuff, the local script & script seem to be fine. (Please Reply)
Same
line 49 of the code, for me, i had to change to: if (lasttarg.Position - char.PrimaryPart.Position).Magnitude > (v.Position - char.PrimaryPart.Position).Magnitude then
GUYS PLS HOW TO EMPORT ANIMATIONS AND STAFF FOR THE 3:35 minutes
I'm having a little bit of trouble on line 49 of the local script. The output says "attempt to compare Vector3 < number"
Here's what the code looks like on my end:
local lasttarg
for i, v in pairs(hb:GetTouchingParts()) do
if v.Parent:FindFirstChild("Humanoid") and table.find(ignore, v.Parent) == nil then
if lasttarg then
if (lasttarg.Position - char.PrimaryPart.Position).Magnitude > (v.Position - char.PrimaryPart.Position) then
lasttarg = v.Parent.PrimaryPart
end
else
lasttarg = v.Parent.PrimaryPart
end
end
Any help would be great
at the end of if (lasttarg.Position - char.PrimaryPart.Position).Magnitude > (v.Position - char.PrimaryPart.Position) add .Magnitude
i did everything but my hit box keeps appearing anytime i hit a dummy and doesn’t continue the combo but the combo works when i don’t hit a dummy
I'm gonna ask ,how will I put this in a tool like GPO , Project Slayer's Combat type? Thanks.
Pls notify me when someone answered
just add a check for the whole script to only run if a player has the tool equipped
@@xtempor i dont know how to make that can you write the check in here please
@@raysthd5037 if input.UserInputType == Enum.UserInputType.MouseButton1 and tick() - lastTimeM1 > .4 and tick() - lastTimeM1 > 0.6 and character:FindFirstChild("ClassicSword") then
replace classicsword with the tool name you want
@@xtempor thx
Hi, my output is giving me this error:
Workspace.s4lmonella.LocalScript:49: attempt to compare Vector3 < number
My code on lines 49 and 50 looks like this:
if (lasttarg.Position - char.PrimaryPart.Position).Magnitude > (v.Position - char.PrimaryPart.Position) then
lasttarg = v.Parent.PrimaryPart
Could this be an issue with R6 or is there some other problem with the code?
Thanks in advance if you do help, and even if you don't, this was a great tutorial.
I had the same thing, You have to put '.Magnitude' behind the last bracket in front of 'then'.
@@YBloem_PotY thank you so much, you’re a lifesaver
@@jntak np haha
i did everything correct, no errors, but it doesn't deal damage. I am using r6 but idk if that's an issue.
its not
Same the hitbox isn’t showing up
use r15 using r6 is the issue try using r15 cuz the tutorial he made is based on r15 it working thanks me in comments
@@amitarajne1906 bro i posted this 1 year ago
@@Cereall lol
If the second part of this tutorial is effects it would be fire🔥
i really want to know how did you do that rock line effect in your previus combat
I’m trying to make a demon slayer game and learning how to do effect would help a lot
@@cameron7910 do u need a devs team?
@@OsDijider66 u dev ?
@@OsDijider66 I do please
what type of dev?? scripter??
@@BuldsOffice
Nicee!!!!!! I subscribed!!!
BRO UR SO UNDERRATED!!!!
Ur cappin
Thank you so much this video really helped me!
Is there a way to add another m1 to the downslam combo. Example m1x3 + (space) with m1 + (this m1 is the extra one) + m1(this one slams down.)
Yeah just increase the m1s
there is always a way
How do I format it like that on 3:37
Isn't this very easily exploitable? You are letting the client fire a remote event that handles vulnerable data like the target, character, combo, air and action.
how would i make a non exploitable system like rogue lineagr
@@wiztrash9530 make a non exploitable system
@wiztash9530 you would have to make the hitboxes on the server along with all the other important things like the target, character, combo air, action like he listed then you would just fire a remote event to the client just to make the effects
Great Video!
Yo I’m having some problems. Can you maybe paste your script here?
Same
Earned a new sub
my friend recommended you to me, and your sword combat series made me see all the scripting methods that are not effective, thanks
W
I have a problem, I dont do knockback idk why
This does work with R6/r6. You just have to replace every part that uses PrimaryPart to HumanoidRootPart and it should work, since R6 dummies apparently don't have a PrimaryPart. Hope that helps!
thanks
i did this, and now when i run it nothing happens, not even an error
you are king
Thanks :D
I have an error called: "Workspace.robloxinatorALi123.CombatClient:50: invalid argument #1 to 'find' (table expected, got Instance)", i wrote "if v.Parent:FindFirstChild("Humanoid") and table.find(ignore, v.Parent) == nil then" on that line, like in the video, whats wrong?
Could you give us a download link so we can download the animations?
make your own dude
how did you make it so the player actually rotates with the lower torso ,whenever i do it it doesnt work
on line 56 and says Expected identifer and same with the == nil then
on line 58 and 59 both lasttarg’s say Unknown global lasttarg
line 64 to line 114 everything says Unreachable code (previous statement always returns
same problem for me
@@Beij1ngCorn yeah
@@kalex_z actually, I fixed the issue
@@kalex_z just a simple typo on my end, but if you haven't fixed it for 12 days, then you probably did sum wrong with the script
@@Beij1ngCorn alr
Hey there! do you ever cover how you would put a kill like this into a leaderboard?
You could've added some functions to the script to make it easier to read and for people to understand
how did you add arrows front of animation ids
i only got 1 animation played even though i putted diffrent punch animations. any way to fix it?
why dosen't the data.Air == "Up" work in the script? when i do the up combo nothing happens and same with the down one, and the animation thingy dosent work?
I did the scrip but on line 75 on local script it says fx is not a valid member for workspace could u maybe help me
Love ur Video bro
when i do it, clicking doesnt do anything. i am confused and really sad on why this is. i followed everything:(
Same.
Hello, my animations and codes are completely ready, but even though my character enters the uptilt animation, it does not go up and the puppet does not go up either.
Hello Ampro, could you make a tutorial on how to make it so that combat only works if the sword from your other tutorial is unequipped?
Just check if your character is equipping the sword before firing the event in your local script
can someone please tell me how to export your animations like he showed in 3:35?
when i click it only plays the first m1 animation
same
well someone didnt watch the whole thing
@@callmejke9317 i already fixed it
for some reason my m1s don work i copy pasted everything to the letter and me and my friends we also tried other peoples guides bu they didnt work either can someone help plzzz
Yo bro its very annoying when you copy and paste a whole page in and we cant copy it
So I'm pretty sure that I have done everything correctly I have even double checked but for some reason when I click it does nothing, I have gone through the ENTIRE code and still can't find the problem
Check your output and debug
@@realampro wdym? Also I manage to make it play the animation and summon the hit box but it plays only the first punch anim(even with the change you made) and it doesn't do any damage
@@realampro it says CFrame is not a valid member of part"Workspace.nickrequiem.HumanoidRootPart" (line 48 in script)
Same
@@Nickrequ1em Check if it says Cframe and not CFrame
on line 5 of the server script where it says "data.Target.Humanoid:TakeDamage(4)" when i test it, it says attemt to index with nil "Humanoid" how can i fix this?
my m1's dont show when i click. My animations that i made arent showing up and I just cant see anything working
same
should the animation only contain the punch or should i also make the arm come back to its original position and where should we start the second punch animation?
WHY WHY WHY WHY WHY DOES THIS HAPPEN
whenever someone gets hit then jumps they just start rising up into the sky indefinitely, PLEASE HELP ME
check the values of your bodyvelocitys and also the value of your game.debris
i have a problem with this if v.Parent:FindFirstChild("Humanoid") and table.find(ignore, v.Parent) == nil then help me pls
I have a problem i closed the tab where i can allow it after pressing on setup. I already tried deinstalling it and reinstalling it but it didnt work. How can you fix this?
im pretty sure i did all the code correctly but even with after i fixed the combo not starting bug, it still wont start the combo. Does anyone know how to fix this?
Same with me did you use R6
I'm trying the scripts but my animations won't run and the errors are saying
Humanoid is not a valid member of "ServerScriptService" - Script:2
And
OnServerEvent can only be used on server - LocalScript:3
Please help urgently😅😅
Having the same problem, did you ever get it to work?
can someone help when i try to do a combo it only plays the first punch and the combo doesn't work
Could you please put the scrip in the descrition please i dnt have time t copy ll of this and trust me im making the best upcoming roblox game and really needed this comabt system i love the way it work and think this would be better than all of my coding combined. I know this is an old video but im still wondering
my Hitbox got buggy, I can only hit the target if it's on top of his head, is there a way to solve it? what animation do you use? anyway thank you
Try setting the hitbox transparency to 0 and get rid of the destroy() temporarily to try and see where the hitbox is goinf
@@realampro I just found out what's going on, whenever I execute the punch, it doesn't hit, I can only deal damage if I'm on top of the dummy's head
RemoteEvents in the ReplicatedStorage can cause throttling, right?
does the animation have to be action or core?
UserinputType is not a valid member of "Enum" plz helpp
UserInputType, not UserinputType. The I is capitalized
Fire tutorial, but would there be a way to remove the spacebar+lmb and have it just be a held click?
You would have to change the inputs required and keep track of if the lmb is being held
@@realampro how did u get the script at 4:34 and 3:39 im more confused about 4:34.
@@son-zora5174 am confused at that part
there is some things i can do to make the system the way i prefer it to work, like instead of m1 x 5, it's m1 x 4 like in most battlegrounds games, and the other things i can just be figuring out.
hey i cant air combo to other people i set my game to r6 its not working
for the flashstep video, can u make it work with r6 please?
bro ur way too underated
why is the .Magnitude part in here 5:04 being an error even tho i typed it in perfectly since i dont know how to script?
another .Magnitude behind the second v.Position - char.PrimaryPart.Position) HERE
My animations doesn't work properly when i attack dummies. I guess when i hit a dummy i get velocity and move forward, but because of that walk animation starts playing and it conflicts with my punching animations... i think. How do i fix it?
Ok, i figured out that i forgot to set animation priority to action. Oops😅
I am having trouble with the animation fully playing, any suggestions on what I should check to fix it?
did you change the animation priority to action
on line 24 are those arrows or something in the start
All good for me except for a few little parts
local lasttarg
for i, v in pairs(hb:GetTouchingParts()) do
if v.Parent:FindFirstChild("Humanoid") and table.find(ignore, v.Parent) == nil then
if lasttarg then
if (lasttarg.Position - char.PrimaryPart.Position).Magnitude > (v.Position - char.PrimaryPart.Position).Magnitude then
lasttarg = v.Parent.PrimaryPart
end
else
lasttarg = v.Parent.PrimaryPart
end
end
I don't really understand this lasttarg thingy, can somebody elaborate please
can you make this into a model!!!! :D I would make following this a lot easier because maybe I'm dumb or my computer is old but I keep running into errors and I'm no sure what I'm missing
is there an r6 version cuz its not working at all even on r15 idk if its bugged or what
Doesn't work, line 101 remote is underlined blue and dont know how to fix and and line 122 - 128 are all under lined red as an error fr wastwe a hole 3hrs
My animations are only playing a third of what they should be... Also, the dummy won't take damage or knock back. Does anyone have ideas of where I messed up?
Did you use R6?
I used the script for adding the animation punches, but my cas on the last line has a blue underline. How do i fix this?
bro it dont work, it brakes everytime the next day i come back and it wont even do anything from just creationg force fields to nothing
Help it keeps saying "error expected ")" to close at line 15
Idk what's wrong with my Scipts but it's not really working it's not doing anything like the damage and the animations
I'm getting the error attempt to index nil with 'Position' at line 49 of local script can someone help me
Can we use this or should we credit you I wanna make a game
I FINALLY FOUND THIS CHANNEL!
Thanks! For some reason, my downslam doesn’t work though.
Can you please tech us/ me how to put this in a slot like press 1 to activate combat in hotbar then u can use it or skills that u have to press 2 like flash step before u can use z
you can do this using tools and adding the local script to it
but you will need to change the code a bit because you need to detect if the player have the tool equiped and then use the move
something like this:
local tool = script.Parent
tool.equiped:Connect(function()
equiped = true
end)
tool.unequiped:Connect(function()
equiped = false
end)
uis.ImputBegan:Connect(function(input, gpe)
if gpe then return end
if input.UserImputType == Enum.UserImputType.MouseButton1 and equiped = true then
--all the other things in the script
@@aank8335 how do you add the tool?
@@asphalt-rocks it is an instance, you can add it like if it was a script or a part
@@aank8335 oh alright thanks but does mesh part work with it
@@asphalt-rocks wdym?
Hey am I allowed to use your animations or not?
ur accually the only person that shows how to make it instead of downloading smth also can u show how to do with a sword?
hey bro can i get some help i wanna know how to get the combat working but no air stuff i can into a animation loading issue and i hope some one can help me out with this? it has to do with the part where its the if statement about air combo animation.
thanks
Im having issues about giving damage, everything else works but I cant do damage or combo bc of it. HELP
SAME BRO have you figured it out yet?