#Knockback and ragdoll
1 messages · Page 1 of 1 (latest)
Dm?
fuck you im not an easy girl
I mean to discuss this script..
** You are now Level 1! **
ohh you wanna see my body
discutting
nah men it’s chill it’s basic script idc
Should be pretty easy to make
Just identify all ur weapons in the module and use them in ur main script
And don't forget to require the module script
This is lowkey hilarious
(Verbal warn) keep it respectful, it may be as a joke but not everyone will take it as a joke
Olay sorry
so 4 the weapon module i created all ur weapon stats go here - dmg, cd, kb force, ragdoll duration n hitbox size. both client n server can access it. wanna new weapon? copy paste n change values ez
** You are now Level 3! **
-- In ReplicatedStoragethen ModulesthenWeaponStats
-- Config for all weapons - edit values here
local Module = {
["Basic"] = {
Damage = 10,
Cooldown = 0.8,
Knockback = 50, -- Force multiplier
RagdollTime = 1.5, -- Secs before standup
HitboxSize = Vector3.new(4, 4, 4)
},
["Heavy"] = {
Damage = 25,
Cooldown = 1.4,
Knockback = 120,
RagdollTime = 2.5,
HitboxSize = Vector3.new(5, 5, 5)
},
["Slap"] = {
Damage = 5,
Cooldown = 0.5,
Knockback = 80,
RagdollTime = 2,
HitboxSize = Vector3.new(3, 3, 3)
}
}
return Module
@blazing thunder
@tropic wedge what did you think for the moment ?
?
Wdym?
Yeah, I did
I meant that I need the knockback system, but its power can be adjusted in module (ik how to make module)
? What is ur issue then? Just change the players velocity
based on the table
-- ReplicatedStorage then Modules then RagdollModule
-- Handles ragdoll on and off and the knokbak force
local RagdollModule = {}
-- Enable ragdoll on with the char flnxtion RagdollModule.Enable(character)
local hum = character:FindFirstChild("Humanoid")
if not hum then return end
-- here you can set the ragdol state
hum:SetStateEnabled(Enum.HumanoidStateType.GettingUp, false)
hum:ChangeState(Enum.HumanoidStateType.Physics)
hum.PlatformStand = true
-- Convert Motor6D to sockets for physic
for _, motor in pairs(character:GetDescendants()) do
if motor:IsA("Motor6D") and motor.Name ~= "RootJoint" then
-- Create constraint
local socket = Instance.new("BallSocketConstraint")
socket.Name = "RagdollSocket"
local att0 = Instance.new("Attachment")
att0.Name = "RagAtt0"
att0.CFrame = motor.C0
att0.Parent = motor.Part0
local att1 = Instance.new("Attachment")
att1.Name = "RagAtt1"
att1.CFrame = motor.C1
att1.Parent = motor.Part1
socket.Attachment0 = att0
socket.Attachment1 = att1
socket.LimitsEnabled = true
socket.TwistLimitsEnabled = true
socket.Parent = motor.Part0
-- Disable motor
motor.Enabled = false
end
end
end
-- Disable ragdoll on char
function RagdollModule.Disable(character)
local hum = character:FindFirstChild("Humanoid")
if not hum then return end
-- Remove sockets + atts pairs(character:GetDescendants()) do
if obj.Name == "RagdollSocket" or obj.Name == "RagAtt0" or obj.Name == "RagAtt1" then
obj:Destroy()
end
end
-- Re-enable motors
for _, motor in pairs(character:GetDescendants()) do
if motor:IsA("Motor6D") then
motor.Enabled = true
end
end
-- Reset thestate
hum.PlatformStand = false
hum:SetStateEnabled(Enum.HumanoidStateType.GettingUp, true)
hum:ChangeState(Enum.HumanoidStateType.GettingUp)
end
-- Apply knockback force to HRP
function RagdollModule.ApplyKnockback(character, direction, force)
local hrp = character:FindFirstChild("HumanoidRootPart")
if not hrp then return end
-- Use LinearVelocity for smooth kb
local att = Instance.new("Attachment")
att.Name = "KBAttachment"
att.Parent = hrp
local lv = Instance.new("LinearVelocity")
lv.Name = "KnockbackForce"
lv.Attachment0 = att
lv.MaxForce = math.huge
lv.VectorVelocity = direction * force
lv.Parent = hrp
-- Remove force after short delay
task.delay(0.15, function()
if lv then lv:Destroy() end
if att then att:Destroy() end
end)
end
return RagdollModule
Okay, ty
thats all you want ?
I will do it
u sure ?
I mostly needed the ragdoll system
But if you want, sure
any tips sir 🫣🫣🫣
I know you saw that message dude
yeah yeah..