I’ve encountered a small issue that I’m unsure how to handle in my battlegrounds project. When I downslam the enemy, they tend to fling a bit. I suspect that the rock module might be causing this issue, but I’m not entirely certain.
Here’s a visual of the issue: Watch 2024-03-20 16-19-41 | Streamable
This is what I want to reproduce : Watch 2024-03-20 16-24-44 | Streamable
The problem isn’t too severe in the video, but sometimes the fling can be much stronger. For instance, if I remove the ragdoll, the fling becomes quite pronounced…
The rock module is client
local function onHitReceived(hitCharacterName)
wait(0.4)
local hitCharacterRootPart = findCharacterRootPart(hitCharacterName)
if hitCharacterRootPart then
local hitPosition = hitCharacterRootPart.Position
local sizeMin = 0.1
local sizeMax = 1
local minAmount = 1
local maxAmount = 10
local onFire = false
DebrisEffectModule.BlockExplosion(hitCharacterRootPart.CFrame, sizeMin, sizeMax, minAmount, maxAmount, onFire)
local Distance = 7
local PartSize = Vector3.new(6, 4.5, 6)/3
local filter = nil
local MaxRocks = 10
local Ice = false
local despawnTime = 3
DebrisEffectModule.Ground(hitPosition + Vector3.new(0, 1, 0), Distance, PartSize, filter, MaxRocks, Ice, despawnTime)
else
warn("Hit character not found: " .. hitCharacterName)
end
end
and server wise this is how I handle the enemy stun and all
if attackType == "Downslam" then
server2:Fire(BridgeNet.AllPlayers(), hitCharacter.Name)
knockbackDirection = Vector3.new(0, -50, 0)
--r6Module:Ragdoll(hitCharacter)
local humanoidRootPart = hitCharacter:FindFirstChild("HumanoidRootPart")
if humanoidRootPart then
humanoidRootPart.CFrame = humanoidRootPart.CFrame * CFrame.Angles(math.rad(90), 0, 0)
end
hitCharacter:FindFirstChild("Humanoid").PlatformStand = true
task.delay(0.6, function()
if humanoidRootPart then
--humanoidRootPart.Anchored = true
end
end)
task.delay(2, function()
if humanoidRootPart then
--humanoidRootPart.Anchored = false
end
--r6Module:Unragdoll(hitCharacter)
if humanoidRootPart then
hitCharacter:FindFirstChild("Humanoid").PlatformStand = false
end
end)