So great to have one finally work after watching so many videos, I also love the use of the template and explaining a bit about what each thing does. It actually helped me learn a bit about coding.
Thank you so much. I hate having to research in hundreds of dev forums to know how to do something, and your videos are really simple and easy to understand.
@@SimTekGameDevelopment I have encountered a small problem though.. "Small", I found that if I leave the "* math.huge" in the code, I get banished to the shadow realm (as soon as my character delivers the punch and applies the knockback, I fly past world borders and die in the void), any ways to solve this?
local rs = game:GetService("ReplicatedStorage") -- place remote event in replicated storage local strikeRe = rs:WaitForChild("StrikeRe") local hookDamage = 30 local hookReach = 3 local hookArea = 2 -- returns humanoid root part and humanoid if valid character local function getHrpAndHumFromChar(char) if char then local hrp = char:FindFirstChild("HumanoidRootPart") local hum = char:FindFirstChild("Humanoid") return hrp, hum else return nil, nil end end -- applies damage if enemy character is within the area of the hit position -- player will be needed for kills leaderboard local function doDamage(player, enemyChar, hitPos, area, damage) local eHrp, eHum = getHrpAndHumFromChar(enemyChar) if eHrp and eHum then local dist = (hitPos-eHrp.Position).Magnitude if dist 0 then if strikeType == "Hook" then local pos = (hrp.CFrame+hrp.CFrame.LookVector*hookReach).Position doStrike(player, pos, hookArea, hookDamage) end end end strikeRe.OnServerEvent:Connect(handleStrikeRe)
Can you make a vid on how to make stun too (so for example if you hit someone with a sword they can't move or do anything for like half a sec)? Great vid btw
Is there a way to make it so that where when pressing a certain keybind you'd do a punch with knockback? I kinda need one and I've been stuck on making one for forever.
Pon los script uno tipea como una hora (somos nuevos), para ver que luego no funciona, asi se nos quitan las ganas de seguir viendo videos que no resultan
That's a roblox studio thing. If you are playing in team test and the other player hadn't saved the animations yet, then it wouldn't show them for them. It works completely fine in actual game (through roblox itself), though.
Yeah it still works. That’s a bummer though. I’ve been playing with the new body movers and they take some getting used to. Fortunately so many games use body velocity it’ll probably work for a while
@@SimTekGameDevelopment Yeah that's true, just always afraid of my 5 hour project being ruined by a simple change like this. Hopefully it's for the better though, can't wait to see whatever video you have instore next!
hey it worked perfectly fine but I just have a question. If I was to make it so that you have more knockback on the next level, how would I implement that? I tried to do loops but that didn't work and I also duplicated the module scripts and made different versions which also didn't work. Do you have any idea of how I'd implement more knockback on a next leaderstat point/level.
I doesn't work for what I wanted to use it for it was for my game about hitting other people with snowballs but when I tried it it didn't work mabye i typed it in wrong but i never said any errors
late, but if you're still on this problem, you can do it pretty simply. just find a way to ragdoll a player and unragdoll them. once that's done, you just ragdoll them when they're knocked back, and unragdoll them whenever it's appropriate (maybe a second after landing, once they get touched by another player, once they touch grass, whatever works)
@@SimTekGameDevelopment actually, could you find a way to make it into a tool, with the same knockback and ragdoll effect when you hit someone with the tool
@@SimTekGameDevelopment Thanks for the reply, I've been trying to replicate a decent knockback effect with Vectoreforce but it's proving to be a challenge..I can perform the knockback but if I set the speed too low, the target moves a snail's pace, but if i set it too high the target is launched into a new dimension, I'm having trouble finding a way to control the force while also keeping a limited distance..the knockback I'm going for is minor, maybe 2-3 feet from a player's perspective. I can get that knockback but as I said, it's at the speed of a snail and that's not going to make anyone happy lol. Sorry for the rant, I look forward to your next video on this
@@SimTekGameDevelopment Yea, all I gotta do is figure out how to set it to a short distance while still having a fairly quick movement. I thought if I set a speed and distance that would work but it really is only changing how far it goes, not how fast it gets there..been workin at it for 3 days, it's driving me insane so I took today and will take tomorrow as well to do some research and see if I can't figure out what I'm doin wrong.
HI, mate I have checked for like 2-3hrs and I still don't understand, when I deal dmg to a player, they take dmg but have no KB, but when I deal dmg to a zombie in your vid, it takes not dmg but have KB and the KB seems to come from their attack which mean they r knocking them self off me when they attacking (I didn't even press the F key),I would love to get some help from you if it's possible ,so I can show you my script and how the npcs behavi and see if we can fix it or not, if you r willing to help me please leave your contact in my comment, I look forward to recive your news, thanks!
Did you check the output window for errors? Does the animation work? Or is it the knock back. It definitely works, might be something small, but there’s something you’re doing different.
So great to have one finally work after watching so many videos, I also love the use of the template and explaining a bit about what each thing does. It actually helped me learn a bit about coding.
Nice! I’m glad it was helpful!
@@SimTekGameDevelopment Just one question, what would I do to turn a higher amount of knockback into a gamepass?
Thank you so much. I hate having to research in hundreds of dev forums to know how to do something, and your videos are really simple and easy to understand.
Aw thanks man!
@@SimTekGameDevelopment I have encountered a small problem though.. "Small", I found that if I leave the "* math.huge" in the code, I get banished to the shadow realm (as soon as my character delivers the punch and applies the knockback, I fly past world borders and die in the void), any ways to solve this?
Your tutorial saved me from losing a little quality in my attack!
Thanks so much for doing this! THANKS FOR SIMPLIFYING IT
Only looked at the end of your tutorial for the knockback for a joke project, yet it still worked perfectly. 10/10 tutorial!
dude I just searched this needing it for my game and you just published today. Awesome!
local rs = game:GetService("ReplicatedStorage") -- place remote event in replicated storage
local strikeRe = rs:WaitForChild("StrikeRe")
local hookDamage = 30
local hookReach = 3
local hookArea = 2
-- returns humanoid root part and humanoid if valid character
local function getHrpAndHumFromChar(char)
if char then
local hrp = char:FindFirstChild("HumanoidRootPart")
local hum = char:FindFirstChild("Humanoid")
return hrp, hum
else
return nil, nil
end
end
-- applies damage if enemy character is within the area of the hit position
-- player will be needed for kills leaderboard
local function doDamage(player, enemyChar, hitPos, area, damage)
local eHrp, eHum = getHrpAndHumFromChar(enemyChar)
if eHrp and eHum then
local dist = (hitPos-eHrp.Position).Magnitude
if dist 0 then
if strikeType == "Hook" then
local pos = (hrp.CFrame+hrp.CFrame.LookVector*hookReach).Position
doStrike(player, pos, hookArea, hookDamage)
end
end
end
strikeRe.OnServerEvent:Connect(handleStrikeRe)
The legend we all needed
@@urlocalepicgamer7179 frrrrrrrrrrrr
thanks for reply
Thanks bro
Very useful video. I was able to use this to introduce knockback on top of projectile damage. Thanks!
Aw nice! That’s what I like to hear!
One Of The Most Helpful Video On Your Channel In My Opinion I've Learned ALOT From This Video
how to copy and paste scripts
I'm gonna try this because, this seems very cool!!
this is amazing thank you for making this video
these combat tutorials really help!!
Aw cool! I’m glad to hear it!
Just what I needed thank you 🙏
thanks a lot, i am making a game (kinda like ability wars but with tools) that helped a lot.
Why does the npc float into the sky slowly instead of taking knockback??
BodyVelocity is now deprecated, yes it still works but it can cause a lot of error in the future since it's technically outdated
Please Make A tutorial about How to Dodge like sans in Roblox!! I want it for my game!!! I will wait for it :)
can I make it so when I attack a player or npc, they ragdoll on knockback? thanks!
Can you make a vid on how to make stun too (so for example if you hit someone with a sword they can't move or do anything for like half a sec)? Great vid btw
I like it!
what do i do if the enemy instead of taking knockback it starts flying away in the same spot? D:
Can you show how too make a knockback weapon like a sword?
Is there a way to make it so that where when pressing a certain keybind you'd do a punch with knockback? I kinda need one and I've been stuck on making one for forever.
learn how to script
@@Kalyptoisea 🤣
how to add a cool down?
Thanks for the tutorial and it helps A LOT, do you have tutorial on the buttons??
At 12:00 I add buttons in the kick video here: th-cam.com/video/jO7S20XdBfk/w-d-xo.html
@@SimTekGameDevelopment Thank you so much.
Thank you so much!
Great tutorial, but how can I change how fast it takes for my player to get up after he takes the hit? Thank you!
Pon los script uno tipea como una hora (somos nuevos), para ver que luego no funciona, asi se nos quitan las ganas de seguir viendo videos que no resultan
Is there a way to make this work with explosions, such as from rocket launchers? i'm just making a 2009 styled war ragdoll game.
thank you.
Haha yeah, you can add and explosion. I did something similar in a video, I’ll find it
Just add the explosion where you add the damage th-cam.com/video/tm-ndIZV9y4/w-d-xo.html
@@SimTekGameDevelopment Thanks!
It does not lunch back how do I fix this?
I can see the punch animation but whenever I play with someone else they cant see the animations
That's a roblox studio thing. If you are playing in team test and the other player hadn't saved the animations yet, then it wouldn't show them for them. It works completely fine in actual game (through roblox itself), though.
Is it possible that you can use orientation to body velocity
bodyvelocity got deprecated sadly, is it still working?
Yeah it still works. That’s a bummer though. I’ve been playing with the new body movers and they take some getting used to. Fortunately so many games use body velocity it’ll probably work for a while
@@SimTekGameDevelopment Yeah that's true, just always afraid of my 5 hour project being ruined by a simple change like this. Hopefully it's for the better though, can't wait to see whatever video you have instore next!
Can you do it as a tool and it will punch the player when you click?
Is it possible to use these scripts and add it to a projectile like a wand or gun bullets, a part that makes you knockback when hit?
Can you link the Script please
thanks king. for the knockback.
hey it worked perfectly fine but I just have a question. If I was to make it so that you have more knockback on the next level, how would I implement that? I tried to do loops but that didn't work and I also duplicated the module scripts and made different versions which also didn't work. Do you have any idea of how I'd implement more knockback on a next leaderstat point/level.
Make a value of Knockback and a localscript to change knockback when level or part touched I think
Or actually when level changed and level = certain value (datastoreservice)
didnt work, just spent 1 hour on scripting cus im new too
Oh that’s a hard one too!
can you make a tut for the spawner please!
hey, I was wondering if you can uncopylock this game so I can get a hand of it. It would help and mean a lot to me ;)
does this work with r6?
Yes, but you'd have to make some adjustments, like you'd have to do the animation in R6. I use a R15 animation in the video.
Do You know how to change it so it can also be r6???
Does this work for any script or specifically the ones you are using
Also, does it work with R6 too? Just asking btw
You’ll have to make a few modifications, but the core functionality is flexible
@@SimTekGameDevelopment Thanks!
Is mobile able to punch to or if not how can I make mobile can punch
How did you make the ragdoll?
Bruh! That’s a great idea! The Roblox gun kit has ragdoll code in it. Maybe I’ll do a video on how to lift it up and put it in other code.
I doesn't work for what I wanted to use it for it was for my game about hitting other people with snowballs but when I tried it it didn't work mabye i typed it in wrong but i never said any errors
Oh that’s a good idea for the snowballs. I’ll add that to the list.
can you
give me all the script please
Punch is pretty good but I would like it to do a r6/r15 ragdoll to the enemy once the enemy is flung into the air by the punch, any way how?
late, but if you're still on this problem, you can do it pretty simply. just find a way to ragdoll a player and unragdoll them. once that's done, you just ragdoll them when they're knocked back, and unragdoll them whenever it's appropriate (maybe a second after landing, once they get touched by another player, once they touch grass, whatever works)
Great tutorial as always. I was wondering if there was a way to make knockback greater the lower the health of the damage receiver is? Thanks 😊
Yes you could use the humanoid‘s health, (100-health)*velocityScale, as a multiplier for the power in the knockback velocity
l
ll
l
Hey how to make a maze generator with texture
for some reason it didnt work. maybe because y game is r6? idk
why it does int work
it doesnt work. is it because im using r6?
how do i make it owner only?
does it work if u use it on players?
Totally!
@@SimTekGameDevelopment I NEED THIS SO MUCH, I HAVENT TESTED IT YET BUT IF IT WORKS THANK YOU
@@SimTekGameDevelopment actually, could you find a way to make it into a tool, with the same knockback and ragdoll effect when you hit someone with the tool
Mmm, very gooddddd, what about a attack that is like, the enemy floats in air for some seconds then gets fling, sorry me not good at english
Aw man, I have to write these down!
What about using Remote event
You can make a knockback bat r6? Pls
If tried to do this and my punches arnt knocking back any suggestions
Are you getting any errors in the output window? Is damage being done?
I was under the impression body velocity was deprecated
It still works, it’s in too many games to remove but I’m going to start implementing the newer “forces”
I could only hit one time and the knockback didn't work.
Oh check for errors in the output window. If an error occurs after the punch it won’t recover. Check of a typo in your script.
BV is being depricated, what would you use in place of that?
Yup! VectorForce will replace it. Thanks for reminding me, I meant to do a video on that for a while.
@@SimTekGameDevelopment Thanks for the reply, I've been trying to replicate a decent knockback effect with Vectoreforce but it's proving to be a challenge..I can perform the knockback but if I set the speed too low, the target moves a snail's pace, but if i set it too high the target is launched into a new dimension, I'm having trouble finding a way to control the force while also keeping a limited distance..the knockback I'm going for is minor, maybe 2-3 feet from a player's perspective. I can get that knockback but as I said, it's at the speed of a snail and that's not going to make anyone happy lol. Sorry for the rant, I look forward to your next video on this
@@RetrogamingCostello13342 oh I hear you, the new movers aren’t as easy as the old ones for sure!
@@SimTekGameDevelopment Yea, all I gotta do is figure out how to set it to a short distance while still having a fairly quick movement. I thought if I set a speed and distance that would work but it really is only changing how far it goes, not how fast it gets there..been workin at it for 3 days, it's driving me insane so I took today and will take tomorrow as well to do some research and see if I can't figure out what I'm doin wrong.
Is it suppose to work on a real player
Yes
How to do it ragdol
its g - u - i not gui bro
Gooowiii, it’s fun to say man! Join the dark side 😈
why doesnt the knockback work
You might have made an error, go through the video and check your work
@@SimTekGameDevelopment ok tysm
HI, mate I have checked for like 2-3hrs and I still don't understand, when I deal dmg to a player, they take dmg but have no KB, but when I deal dmg to a zombie in your vid, it takes not dmg but have KB and the KB seems to come from their attack which mean they r knocking them self off me when they attacking (I didn't even press the F key),I would love to get some help from you if it's possible ,so I can show you my script and how the npcs behavi and see if we can fix it or not, if you r willing to help me please leave your contact in my comment, I look forward to recive your news, thanks!
bro i typed everything checked it 5 times and everything is exact followed every minor movement, shit dont work
Did you check the output window for errors? Does the animation work? Or is it the knock back. It definitely works, might be something small, but there’s something you’re doing different.
add kill
its pronounced (gee you iii)
😂😂. Gooey is cooler!!
sombody have free script?
to copy
Does ir work with real players?
Yes
hi, i have another problem, it just doesn't knockbacks, it dealsdamage but 0 knockback