ForceChoke with ropeconstaint weird outcome

hey there!

i am making a forcechoke script where you can take players with you for 2 seconds

i used ropeconstraint for this but it has a weird outcome when you look at the players prespecrifes

anybody know another way to replicate what i am trying to do or did i do something wrong?

targethum:FindFirstChild("Forcechoking").Value = true
								if targethum.HipHeight == 7 then
								local rope = Instance.new("RopeConstraint")
								rope.Parent = touchpart
								local forcechokefollow = game.ReplicatedStorage.ForcePowers.ForceChokeFollow:Clone()
								forcechokefollow.Parent = char
								forcechokefollow.Position = touchpart.Position
								
								rope.Attachment0 = forcechokefollow.RopeAttachment
									rope.Attachment1 = Torso.BodyFrontAttachment
									rope.Restitution = 1
									
									
										for _ = 1, 20 do
								wait(0.1)
									forcechokefollow.Position = touchpart.Position
								end
								
								rope:Destroy()
								forcechokefollow:Destroy()
								end
						
								
	
							 --not (humanoid.Parent.Name == char.Name) then
							
								targethum.HipHeight = 0
								targethum:FindFirstChild("Forcechoking").Value = false
							targethum.WalkSpeed = 16
							dmging = false

ty!

try lerping/tweening the player’s position towards the person using the force choke, because roblox physics can be unreliable sometimes

could you maybe give me an example bc i have tried this but it didnt go how i wanted it to go?

I tried creating my own force choke script and it seems to be smooth enough
https://gyazo.com/ba492e4dc3ca73211630dd721983184f

local uis = game:GetService("UserInputService")
local ts = game:GetService("TweenService")
local plr = game.Players.LocalPlayer
local hrp = plr.Character.HumanoidRootPart
local anim = script.Animation
local forceanim = plr.Character.Humanoid.Animator:LoadAnimation(anim)
forceanim.Priority = Enum.AnimationPriority.Action4


local distance = 4
uis.InputBegan:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.F then
		local mouse = plr:GetMouse()
		if mouse.Target == nil then return end
		if mouse.Target.Parent:FindFirstChild("HumanoidRootPart") then
			local echar = mouse.Target.Parent
			local ehrp = echar.HumanoidRootPart
			forceanim:Play()
			wait(forceanim.Length - 0.1)
			for i,v in pairs(echar:GetDescendants()) do
				if v:IsA("BasePart") then
					v.CollisionGroup = "Forced" -- Making the enemy player intangible to the player holding him (it can be abused to glitch through walls though)
				end
			end
			ts:Create(ehrp,TweenInfo.new(0.1,Enum.EasingStyle.Linear),{CFrame = hrp.CFrame + hrp.CFrame.LookVector * distance}):Play()
			local keeploop = true
			spawn(function()
				while keeploop == true do
					wait()
					ts:Create(ehrp,TweenInfo.new(0,Enum.EasingStyle.Linear),{CFrame = hrp.CFrame + hrp.CFrame.LookVector * distance}):Play()
				end
			end)
			wait(2)
			keeploop = false
			for i,v in pairs(echar:GetDescendants()) do
				if v:IsA("BasePart") then
					v.CollisionGroup = "Default"
				end
			end
		end
	end
end)

yes thanks for sending me this but, its suppose to be diffrent. i cant show you an example but i can send you a game link so if you want to check what i mean here: saber BG [ULTIMATE] - Roblox but the thing is, its a hitbox that is attached to the player and whoever touches the hitbox gets roped and when the player that forcechoked the other person moves they are suppose to move the direction off the player who used the forcechoke if you get that? i would love to get a respondse tho cuz i am still having this stupid choke :confused:

I guess you can just use the same script but make it fire when another player enters the hitbox. I don’t know how it works since there are no dummies in the game.

so what happends = when the hitbox gets hit the players hipheight is 7 and plays an anim, then a rope get attached to the player but this results issues wich i dont really know a solution for yet.

I suspect you might have more luck achieving your desired result by using RodConstraints rather than RopeConstraints. Here’s a link to the doc article about them:

Edit: @idkyouknowl Actually after reading every comment I think using a WeldConstraint would also be a good way to achieve the result with the benefit of not having to worry about calculating the Rope or Rod’s Length. I would suggest welding the PrimaryParts of the characters that enter the hitbox to the PrimaryPart of the character that activated the force choke then destroying the WeldConstrains after 2 seconds have passed using game:GetService("Debris"):AddItem(weldConstraint, 2)

1 Like

i could do this but, this will also make it weird since if a player gets forcechoked and another player too it will cause a problem bc the 2 players will collide with each other i think? also i already tried rodconstraint, it was almost the same as ropeconstraint sadly, maybe i just need to mess around with bodyvelocitys to get the right values ig…

2 Likes

You can use collision groups to prevent players from colliding with each other

then they will just touch each other wich i dont want since the game has lightsabers that will almost 1 hit players.

But you can use collision groups to prevent objects from being able to touch each other? It also shouldn’t affect how much damage your lightsaber does

sadly it doesthe lightsabers use raycasthitboxv4 and if they detect a hit they will do what is in the script meaning cutting off an arm/leg wich will affect gameplay so i have to just have to find another way.

I’m unfamiliar with raycasthitboxv4 so I won’t be able to help you with problems concerning it unfortunately

1 Like

thanks for trying to help me i really appreciate it!

1 Like