When the character dies it dies like 100 times and I cant do anything about it! For my knowledge the problem is the ragdoll module script listed here:
if not char:FindFirstChild("Ragdolled") then
local ragval = Instance.new("NumberValue")
ragval.Name = "Ragdolled"
ragval.Parent = char
ragval.Value = timer
for i, v in pairs(char:GetDescendants()) do
if v:IsA("BallSocketConstraint") then
v.Enabled = true
end
if v:IsA("Motor6D") then
v.Enabled = false
end
end
print("Target Successfully Ragdolled!")
for i=1, ragval.Value do
task.wait(1)
ragval.Value -= 1
end
ragdoll.Stand(char)
else
char:FindFirstChild("Ragdolled").Value += timer
print("Failed To Ragdoll Enemy Due To Stuff.")
end
end
function ragdoll.Stand(char)
if char:FindFirstChild("Ragdolled") then
char:FindFirstChild("Ragdolled"):Destroy()
end
for i, v in pairs(char:GetDescendants()) do
if v:IsA("BallSocketConstraint") then
v.Enabled = false
end
if v:IsA("Motor6D") then
v.Enabled = true
end
end
print("Target Successfully Stood Up!")
end
Here is a video of the problem:
robloxapp-20231117-1942005.wmv (1.2 MB)
please help.