Hello devforum community, recently I had some trouble with some handcuffs. The problem made the cop be stuck on the ground when holding someone (When the cop holded someone the arrested person’s humanoid root part was welded tot he tool handle). In one of the replies, it was suggested to force the humanoid state to be running istead of running no physics to fix the issue. I did some testing and it worked when I make the state of the cop running and the state of the crim running no physics. Now, Im having problems changing the humanoid state.
When I arrest the other player in the multiple player test in roblox studio, sometimes it works and the states are like I said before, running for the cop, and running no physics for the crim. But sometimes, for some reason it is running for the 2 of them, and that makes the cop not be able to walk.
This is the script im using to change the state:
runs.Stepped:Connect(function()
print("Loop")
if thischar ~= nil then
if holding == true then
print("Loop accepted")
thischar.Humanoid:ChangeState(Enum.HumanoidStateType.Running)
print(tostring(thischar.Humanoid:GetState()).. " Cop character")
otherchar.Humanoid:ChangeState(Enum.HumanoidStateType.RunningNoPhysics)
print(tostring(otherchar.Humanoid:GetState()).. " Crim character")
end
end
end)