Cannot stop a player from moving

I have been making a force choke that kills an enemy player, but the player can still move! I have been trying to stop it but I can’t.

Up to now, I have turned off the WalkSpeed and JumpPower but when the character died, and respawned, it couldn’t stop moving or it can’t move at all.

I have been working on this for a little while, I hope someone can help
Here are my scripts

wait(3)
local player = game.Players.LocalPlayer
local Mouse = player:GetMouse()
local Target = player.Character:FindFirstChild("Humanoid")
local Animation = Target:LoadAnimation(script.Choke)


local Debounce = false

Mouse.KeyDown:Connect(function(Key)
	if Debounce == false then
		Key = Key:lower()
		if Key == "f" then
			game.ReplicatedStorage.WaterBeam:FireServer(Mouse.Target)
			Animation:Play()
			Debounce = true
			local controls = require(game:GetService("Players").LocalPlayer.PlayerScripts.PlayerModule):GetControls()
			controls:Disable()
			wait(2)
			Debounce = false
			local controls = require(game:GetService("Players").LocalPlayer.PlayerScripts.PlayerModule):GetControls()
			controls:Enable()
		end		
	end
end)
-- local rp = game.ReplicatedStorage
local Debound = false


rp.WaterBeam.OnServerEvent:Connect(function(player, Mouse)
	
	if Mouse.Parent:FindFirstChild("Humanoid") then
		local Target = Mouse.Parent:FindFirstChild("Humanoid")
		local TargetN = Target.Parent.Name
		
		local Animation = Target:LoadAnimation(script.Choke)
		if Debound == false then
			local Hum = Mouse.Parent
			Target.JumpPower = 0
			Target.WalkSpeed = 0
			Animation:Play()
			wait(2)
			Animation:Stop()
			Target.JumpPower = 50
			Target.WalkSpeed = 16
			print("Humanoid")
			
			Target.Health = 0
		else
			print("No Humanoid")
		end
	end
end)

Please Note: I use another account to program.

do this:

target.Parent:FindFirstChild'HumanoidRootPart'.Anchored = true

they wont be able to move but freezed in there position.

Try this.

1 Like

I already tried this but it has to be inside the player. I have the script in the server script service. Thanks anyway

I did this but now my character freezes forever.

make sure to do it to the target, not your character.

So you want the character to not move while the other player is holding F right? Did you test if your RemoteEvent working properly?

To answer your question, yes I have, because it kills the character and loads the animation

I have been aiming at the target, but thanks for thinking about errors

Ok, you kill the character and load their character again, then turn off their walkspeed? I’m confused as to what you’re doing.

If you have been reading the replies, you would see that I’m now anchoring the HumRootPart, but it can’t un-anchor apparently.

1 Like

Did you try Humanoid.Died function on the target?

No, I have not, I am going to try it. But please explain further on how you would use it

Well, it’s a event that fires when a player dies. You can try to un achor the humanoidrootpart when this event fires.

(player's model).Humanoid.Died:Connect(function()
--stuff you want
end)

That is what I just tried but it doesn’t work.

Here is a way for you to test the model: This is the original one. Choke
I used to try to enable and disable movement from inside the character