Hey can u help it won't work no errors in output or nothing I don't what's happened I have check and it's the same do u know how I could fix I have tried everything??
this worked very well for me. i already had my own damage code, so i simply pasted the knockback() function into my scripts and made sure i was calling it correctly. thank you!
@@MasimbaMvura-y1n sure - just call this function whenever an enemy gets hit. it's all you need. (make will need to tweak 2 of the lines, so that they refer to whatever your enemy and player variables are named) --this knocks the ENEMY back, not a player function knockback()
--local power = math.random(0,75) local power = math.random(0,50)
--this should refer to the enemy humanoid root part (you might need to tweak this line) local ehrp = model.HumanoidRootPart
--this should refer to the player who hit the enemy (you might need to tweak this line) local plyr = game.Players[configs.creator.Value]
--print("the player who hit me was " .. plyr.Name)
local uhrp = plyr.Character.HumanoidRootPart local att = Instance.new("Attachment", ehrp) local lv = Instance.new("LinearVelocity", att) lv.MaxForce = 9999999 lv.Attachment0 = att local lookVector = uhrp.CFrame.LookVector lv.VectorVelocity = lookVector * power local tween = ts:Create(lv, kbtween, {VectorVelocity = lookVector * 0.1}) tween:Play() game.Debris:AddItem(att, 0.3) end
@@zenikui so you see how in that script mostly from this it sends 'size' exploiters can just do this game.ReplicatedStorage.Events.Hitbox:FireServer(vector3.new(2048,2048,2048),vector3.new(3),math.huge(),999) client should not have the power to set hitbox size or the damage, things like that should be handled on server as well as having hitbox summon on server yeah you might get delays in the hit but it's more secure. most checks i would say for this code would be checks to see if size is too big and if the player is in range of the person casting the hitbox like using like a magintue of how far in front of player's character the hitbox should activate damage/knockback as well as a check for damage so expoilters can't just do inf damage. No offense to the creator at all just wanting to be well helpful
hello :D i rly like your videos about coding. many other devs just skipping entire code to make video not very long. tysm for that! but the thing is when at 2:10 you were making knockback, on video it was sliding to position where it stops going , but for me i just almost tp there (it not tp at all, it going there very fast it looks like it tp) pls say what it can be im confused :( ty :)
Hey Dev can u help I have done everything right double check but I dosent work I have checked in output nothing wrong check in vid and it's the exact same do u know what's happening if so can u help?
That jittery thing will not happen in an actual game. Im assuming you’re testing on a dummy. The jitter is when the dummy moves out of your network ownership so it shouldnt happen in an actual game
I have followed the Tutorial to the Tea and I have even copied from the pastebins and yet the knockback seems to be laggy, almost like the tween isn't working
This works way too well Here are some ideas: • The person who takes damage is animated and has stun • Ability with toolbar GUI that displays cooldown(I didn’t understand it during the dev log you made)
For the first step, you can simply add an animation by accessing the hit.Humanoid.Animator within the damage script, and then load the animation onto the character. For the stun effect, use a separate script (which should be disabled by default) within the main script. In the damage section of the main script, create a function in the 'stunhandler' script that disconnects the player's keyboard input from the game, allowing them only to control the camera. After a certain duration, this 'stunhandler' script should be removed. To achieve this, you can make the 'stunhandler' script clone itself onto the hit.Character or a similar target. Sorry if you couldn't understand me, my english is bad, im trying to learn.
Everything works fine for me but it looks a bit laggy for some reason, I tested it in game (not in studio) to check if it was a studio issue but it wasnt. The only difference between mine and yours is that the script is stored on the server. It also can't be my pc lagging cuz it doesnt have issues on other games at all, roblox included. If you or anyone could help me out I would really appreciate it. edit: (just realized yours is also stored on the server)
Well it rlly depends on how you’ve made the knockback. In the game im making rn, I use body velocity which isnt what i used in this video. Perhaps try using bodyvelocity or linear velocity instead for your knockback
@@MajesticUC I did the exact same knockback as you (linear velocity), using pretty much the same code edit: I figured out what was making it laggy, line that rotates the enemy towards the attacking player. But do you know how to get that effect in another way? function KnockBack(pHrp, eHrp, power) local att = Instance.new("Attachment", eHrp) local lv = Instance.new("LinearVelocity", att)
@@MajesticUC With my latest changes it seems like when a second player joins in is when the knockback is laggy. Could you try to launch a local server with 2 players to see if the knockback becomes laggy, if you could it would be very very appreciated! 🙏
Yes you could. You could fire the knockback parameter as a vector 2 in the local script. Then in the server script inside of the knockback function you can do lv.VectorVelocity = uhrp.Cframe.LookVector * power.X + Vector3.new(0, power.Y, 0)
Stunning is as easy as disabling player movement (by setting the humanoids move speed to nothing) and having some sort of condition, something like a “status” that changes to stunned, and when it’s set to stunned you aren’t able to M1 or do any skills or etc.
i wanted to start with sorry but aswell as sorry if its ok even the what i said was horrible to you i was wondering if you could mabye help work on a project with me if not you can so no and say something as rude as i did last time just cause it didnt work for me☹️
Like and Sub! Tell me what tutorial I should make next!!!
Particle effects
Make Stun PLEASE! I NEED IT!!!!
question, how can I make the knock back on the 5th hit
The knockback is the final parameter of the remote event. Just add 2 more else ifs and then increase the knock back on the final punch
Hey can u help it won't work no errors in output or nothing I don't what's happened I have check and it's the same do u know how I could fix I have tried everything??
this worked very well for me. i already had my own damage code, so i simply pasted the knockback() function into my scripts and made sure i was calling it correctly. thank you!
Yo rlly quick can you tell me which bit you pasted
@@MasimbaMvura-y1n
sure - just call this function whenever an enemy gets hit. it's all you need. (make will need to tweak 2 of the lines, so that they refer to whatever your enemy and player variables are named)
--this knocks the ENEMY back, not a player
function knockback()
--local power = math.random(0,75)
local power = math.random(0,50)
--this should refer to the enemy humanoid root part (you might need to tweak this line)
local ehrp = model.HumanoidRootPart
--this should refer to the player who hit the enemy (you might need to tweak this line)
local plyr = game.Players[configs.creator.Value]
--print("the player who hit me was " .. plyr.Name)
local uhrp = plyr.Character.HumanoidRootPart
local att = Instance.new("Attachment", ehrp)
local lv = Instance.new("LinearVelocity", att)
lv.MaxForce = 9999999
lv.Attachment0 = att
local lookVector = uhrp.CFrame.LookVector
lv.VectorVelocity = lookVector * power
local tween = ts:Create(lv, kbtween, {VectorVelocity = lookVector * 0.1})
tween:Play()
game.Debris:AddItem(att, 0.3)
end
Your tutorials are pretty useful , thank you ! Keep going
Thanks for the support!
Just a note, client hitboxes can be easily expoilted a good tip is to add checks if you are doing client hitboxes or just do server hitboxes.
Thank u so much!
@@zenikui so you see how in that script mostly from this it sends 'size' exploiters can just do this game.ReplicatedStorage.Events.Hitbox:FireServer(vector3.new(2048,2048,2048),vector3.new(3),math.huge(),999) client should not have the power to set hitbox size or the damage, things like that should be handled on server as well as having hitbox summon on server yeah you might get delays in the hit but it's more secure. most checks i would say for this code would be checks to see if size is too big and if the player is in range of the person casting the hitbox like using like a magintue of how far in front of player's character the hitbox should activate damage/knockback as well as a check for damage so expoilters can't just do inf damage. No offense to the creator at all just wanting to be well helpful
To add damage you need to go to hitbox script, go to line 33 and add another line and type in the new line "local damage = Your damage
Thanks, your videos are really helpfull, i belive you will have sucess if you keep doing this :D (sorry if im using bad grammar, im from brasil lol)
Thanks!!! 😊
hello :D i rly like your videos about coding. many other devs just skipping entire code to make video not very long. tysm for that! but the thing is when at 2:10 you were making knockback, on video it was sliding to position where it stops going , but for me i just almost tp there (it not tp at all, it going there very fast it looks like it tp) pls say what it can be im confused :( ty :)
bro i have the same problem, but i think try making the power low but the debris duration longer?
I think you are my new favorite roblox dev youtuber!
You shouldn’t be using .Touched, instead use overlap perams or get parts in part.
thank you man
u earned a sub and a like :)
Hey Dev can u help I have done everything right double check but I dosent work I have checked in output nothing wrong check in vid and it's the exact same do u know what's happening if so can u help?
same
how would i add a animation to knowckback and also how do i add sounds to the punches
Can u do one on stunning or air combos pls keep it up btw
Yeah Definitely!
@@MajesticUC tysm ❤
@@MajesticUCStun would be great (air combos to)
I tried this, though the knockback is jittering and laggy for some reason..
That jittery thing will not happen in an actual game. Im assuming you’re testing on a dummy. The jitter is when the dummy moves out of your network ownership so it shouldnt happen in an actual game
This is such a great tutorial! And can you do a particle tutorial
this is good for me cuz i cant really code but can animate really well
hey can you make an animation for the 3 part and do it so that you get cash
when it dies and so it will respawn
Could make a tutorial on how to add a animation when the dummy is hit. Also keep your vids going, there great!
Could you please do tutorial how to apply Stun after last punch in combo and how to add stun animation?
hey can u make a video about the hit stun and the stun u will recieve when m1 or the one who get m1ed?
K
You should make a tutorial on how to add stun to the punches
my knockback is laggy it kinda just teleports the player it hits
Hey could you possibly tell how to make sfx with it or include sounds when they get hit, or animation when they got hit?
next devlog when
I've been away for a few days now but I'm finally back! Should come out either this week or next week 🤷
@@MajesticUC yay
I have followed the Tutorial to the Tea and I have even copied from the pastebins and yet the knockback seems to be laggy, almost like the tween isn't working
i made it so i have 5 punches but it says if kb
can you make another part that shows how to add vfx and make separate attacks
hey just wondering if you could make a stun tutorial thank you.
PLS MAKE STUN TUTORIAL!!!!
can u make a tutorial showing us how to use particles and SFX?
whats that opening sound effect :o
Regular show theme song
This works way too well
Here are some ideas:
• The person who takes damage is animated and has stun
• Ability with toolbar GUI that displays cooldown(I didn’t understand it during the dev log you made)
For the first step, you can simply add an animation by accessing the hit.Humanoid.Animator within the damage script, and then load the animation onto the character. For the stun effect, use a separate script (which should be disabled by default) within the main script. In the damage section of the main script, create a function in the 'stunhandler' script that disconnects the player's keyboard input from the game, allowing them only to control the camera. After a certain duration, this 'stunhandler' script should be removed. To achieve this, you can make the 'stunhandler' script clone itself onto the hit.Character or a similar target.
Sorry if you couldn't understand me, my english is bad, im trying to learn.
When new dev LOGG?????????????
I have been away for a while. It should come out by next week or the week after!
i can learn from this, thanks a lot 👍
Glad to hear that!
Everything works fine for me but it looks a bit laggy for some reason, I tested it in game (not in studio) to check if it was a studio issue but it wasnt. The only difference between mine and yours is that the script is stored on the server. It also can't be my pc lagging cuz it doesnt have issues on other games at all, roblox included.
If you or anyone could help me out I would really appreciate it.
edit: (just realized yours is also stored on the server)
Well it rlly depends on how you’ve made the knockback. In the game im making rn, I use body velocity which isnt what i used in this video. Perhaps try using bodyvelocity or linear velocity instead for your knockback
@@MajesticUC I did the exact same knockback as you (linear velocity), using pretty much the same code
edit: I figured out what was making it laggy, line that rotates the enemy towards the attacking player. But do you know how to get that effect in another way?
function KnockBack(pHrp, eHrp, power)
local att = Instance.new("Attachment", eHrp)
local lv = Instance.new("LinearVelocity", att)
lv.MaxForce = 999999
lv.Attachment0 = att
lv.VectorVelocity = pHrp.CFrame.LookVector * power
/ / / Thats the rotation thing \ \ \
eHrp.CFrame = (pHrp.CFrame - pHrp.CFrame.Position + eHrp.CFrame.Position) * CFrame.Angles(0, math.rad(180), 0)
game.Debris:AddItem(att, 0.2)
end
Idk if I can help then. Mine isnt laggy at all. Sorry I cant help 😢
@@MajesticUC With my latest changes it seems like when a second player joins in is when the knockback is laggy.
Could you try to launch a local server with 2 players to see if the knockback becomes laggy, if you could it would be very very appreciated! 🙏
how can i make the player ragdoll when he gets knockback?
How to put animation for the victim?
Wait can you add this to a ragdoll script? If you can, then how?
hey man can u make downslam and uppercut?
Very cool thanks! anything i could add to make them fling up a bit?
Yes you could. You could fire the knockback parameter as a vector 2 in the local script. Then in the server script inside of the knockback function you can do lv.VectorVelocity = uhrp.Cframe.LookVector * power.X + Vector3.new(0, power.Y, 0)
@@MajesticUC where do I start it? At local lookvector or lv.Vector velocity?
@@Hehelol3321 start what?
@@MajesticUC at waht point do I write it?
@@Hehelol3321 write what
Can you make knockback physics
hey can you fix this uhh error " ServerScriptService.Script:58: attempt to compare nil
Please do q to dash
you can make plz part 3 it giving sounds
how do i change the damage of the punch?
in the hitbox function there is a parameter for damage. Just change that
heyyy its not working :(@@MajesticUC
is it possible to make them ragdoll after they get hit
yes
@@MajesticUC how
how do I make it do knockback every hit? EDIT: nvm i found out how to do it
0:24 how can an ai voice have voicecrack !?!?!
its not ai...
@@MajesticUC ?
@@MajesticUCwha-
Is it possible to change the direction of knockback like upwards?
Yes
yea i figured it out lol but amzing response very helpful 9/10 @@Stickdraws
@@fkn_ant lol I didn’t know how tho sorry
Uhh mine doesnt do knock back
How to ragdoll?
pls show how to add ragdoll to it
can you make a fireball for r6?
Good Work!! frfr
can you make a damage blocking guide?
sure use attriubutes
How to add sound on punch?
I think that after one of the hits in the non velocity script add a sound and then after the attack play the sound.
Its not working :(
Join discord for help
@@MajesticUC i dont have discord :(
@@Peaceful_Bacon then download it?
Wait nvm it works :) lol
@@MajesticUCcan you make a hit animation
You earned a sub
Please make a stun tut!
Stunning is as easy as disabling player movement (by setting the humanoids move speed to nothing) and having some sort of condition, something like a “status” that changes to stunned, and when it’s set to stunned you aren’t able to M1 or do any skills or etc.
tysm it worked
i wanted to start with sorry but aswell as sorry if its ok even the what i said was horrible to you i was wondering if you could mabye help work on a project with me if not you can so no and say something as rude as i did last time just cause it didnt work for me☹️
is that a yes or no
can u do kicking next
i think that for kicking you can just change the animation for a kicking animation
@@LostLoserHero yup
@@LostLoserHero nope and the hit box aswll as how it would effect you when u were hit🤨
THNXX