I’m trying to make a launching system where a force is applied to a ragdoll. However, doing this cause the character to fly. I tried to use PlatformStand and Massless properties but that doesn’t seem to work. If anyone knows the cause of this issue, please let me know!
Script:
local function applyRagdoll(rig)
for _, v in pairs(rig:GetDescendants()) do
if v:IsA("Motor6D") then
v.Parent.Anchored = true
v.Parent.CanCollide = true
local a0,a1 = Instance.new("Attachment"),Instance.new("Attachment")
a0.CFrame = v.C0
a1.CFrame = v.C1
a0.Parent = v.Part0
a1.Parent = v.Part1
local b = Instance.new("BallSocketConstraint")
b.Attachment0 = a0
b.Attachment1 = a1
b.Parent = v.Part0
v.Parent.Anchored = false
v:Destroy()
end
end
end
local function onLaunch(player, force)
applyRagdoll(Rig)
local root = Rig.HumanoidRootPart
local attachment0 = root.Attachment0
local attachment1 = root.Attachment1
local vectorForce = Instance.new("VectorForce")
vectorForce.Parent = root
vectorForce.Force = root.CFrame.LookVector * force
vectorForce.Attachment0 = attachment0
vectorForce.Attachment1 = attachment1
task.wait(.5)
vectorForce:Destroy()
end