How to make player :MoveTo while having 0 walkspeed

Hello everyone, im trying to make a detain system.

And one part of the detain system is “Leading” where the “Detained player” is going to follow your back, while not being able to run away.

Not being able to run away is easy, just set walkspeed to 0, easy right?

No, because if the player has 0 walkspeed, he cant follow the “Detainer”.

Any possible fixes.

1 Like

Either you use a weld, SetNetworkOwnerShip or Motor6Ds

How? Can you explain?

And welds are not a option because I want the “Detainee” to have a walking animation

1 Like

Set the person you want to detain by using Welds. Part0 goes from your character.HumanoidRootPart then the other person.HumanoidRootPart.

Then, loop all other person.Character child and set it to Massless.

Try it out.

Hello.

Additionaly to the methods by @GFXBIT, you can instead use a RemoteEvent and fire it to the client with an argument stating whether the player is being currently cuffed or uncuffed. Once the client receives it, make a function to disable the player’s controls via the PlayerModule’s Controller. You can see more on it in this post.

But summed up quickly, make a LocalScript and in it, define the variable where you require the Controller:

local Controller = require(game:GetService(“Players”).PlayerScripts.PlayerModule):GetControls()

Then add:

yourEventHere.OnClientEvent:Connect(function(stateRequired)
    if stateRequired == "cuff" then
       Controller:Disable()
    elseif stateRequired == "uncuff" then
       Controller:Enable()
    end
end) 

However, note that as with any other method for stopping a player’s movement ability (except anchoring them for example, in which case they could move only client-side), you cannot stop an exploiter this way from them re-enabling their controls. This is because a player has full control of their client, of course.

Anyway, after the code above, you can move the player using :MoveTo() freely.
I hope this solves your issue. Let me know if you have any questions and good luck!

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.