I have been trying to make a (very basic) knock down system and i got argument 2 missing or nil, any idea how to fix this?
local knocked = script.Parent.Humanoid:GetAttribute("knocked_down")
while true do
wait(0.25)
if script.Parent.Humanoid.Health <= 10 then
knocked = true
script.Parent.Humanoid:SetStateEnabled("Ragdoll")
else
knocked = false
end
end
The error occurs on this line of code. You haven’t provided the second argument which determines if the state can be used or not. Add a second argument to that line of code as true or false.
There no HumanoidStateType such as “Ragdoll”, so your script will probably error cause of that. Check out this documentation, that lists all the HumanoidStateTypes available: HumanoidStateType | Roblox Creator Documentation