HumanoidRootPart and RootJoint (Client/Server)

Looking for a second opinion on if this script is reliable (in the meantime) to check for these specific parts repetitively and to turn collisions off. If there’s a better method, any suggestions would be appreciated. Thank You.

repeat
wait(10)
for _, object in ipairs(workspace:GetDescendants()) do
	if object:IsA("Part") and object.Name == ("HumanoidRootPart") then
	   object.CanCollide = false
end
end
until false

Not very good for optimization. You’re looping through the entire workspace, which can have thousands of parts. You could use a .CharacterAdded event to set the collision of each character’s HumanoidRootPart to false every time a character loads.

1 Like

Right.

So, it would be setup instead for .CharacterAdded for optimization.

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(Player)

Player.CharacterAdded:Connect(function(Character)

		Character.HumanoidRootPart.CanCollide = false
	end)
end)

What if a part with that name is added but it’s not a character?

The reason I’m asking is because there’s an exploit where the actual HumanoidRootPart is duplicated from the exploiters character and is grouped separately from the original character. This part is able to collide with other characters at high speeds which caused them to fling. (Image provided)5346

Yes, FilteringEnabled is enabled and so on.

Nope not exactly, local scripts cannot duplicate parts unless they can access the server via remotes.

They are exploiting the fact that the client can delete instances from their character model. (Pretty dumb of roblox to do this tbh)

Initially Root Motor:

After deletion of the Root motor, on the client:

Then because they also control physics locally they can do the fling to impact other clients as well.

You can just detect this from the server if somehow only their root motor is destroyed and none other parts are destroyed (make sure they didn’t accidently just fall off the base plate). Perhaps using humanoid root part:GetConnectParts.

Then outright ban em.

Replicate trick put this in starter character scripts, as a local script:

local char = script.Parent

while true do
	wait(1)
	local root = char:FindFirstChild("Root",true)
	if root then
		root:Destroy()
break
	end
end

Update: Roblox fixed this issue no need to worry about it anymore.

5 Likes

That’s interesting and actually makes sense. I wish this was handled on the platform itself, instead of leaving developers to basically fend for themselves. As of now, obviously that’s not the case which is why I’m grateful for the guidance from fellow developers.

That script that you mentioned there, can you explain to me what actually that script is designed to do and would it be effective long-term to prevent these exploits?

1 Like

The script there is just to show or mimic how exploiters can simply just delete the root motor on the client.

I’m still trying to think of ways to overcome a way to differentiate this and the root motor being deleted locally in a server script.

1 Like

Thank You for elaborating on that. This information is definitely helpful. These types of issues can be tricky at times (as you know).

If you happen to find any additional methods to this Root / HumanoidRootPart topic, please reach back out.

Again, Thank You.

Here after some findings I have found out that after falling into the void fully destroys the parts first before triggering the root destruction. All this script detects if the HRP gets disconnected from the model and the player becomes invisible as the HRP is invisible.

It still won’t solve the physics fling but it will make it obvious that they are spinning, for this detect the RotVelocity like FJ’s anti cheat.

local Players = game:GetService("Players")

local function punishPlayer(player : Player)
	warn("Root exploit detected")
end

local function onCharacterAdded(character,player : Player)
	print("CharAdded")
	local humanoidRootPart : Part = character.HumanoidRootPart
	character.DescendantRemoving:Connect(function(descendant)
		if descendant:IsA("Motor6D") and descendant.Name == "Root" then
			--print("Root motor destroyed",descendant)
			task.wait(0.1) -- wait for the get connected parts to update
			local connected = humanoidRootPart:GetConnectedParts(true)
			print(#connected,connected,"Connected number")
			--Scenario 1 HRP disconnected from model
			if #connected == 1 then -- only HumanoidRootPart, seperated from model
				punishPlayer(player)
			end
			--scenario 2 humanoid root part is destroyed then, Root motor destroys by itself
			--Nothing to worry about just makes humanoid glitchy
			--They still can do physics exploit from there
		elseif descendant.Name == "HumanoidRootPart" then
			--print("RootPart Destroyed")
		end
	end)
end

local function onPlayerAdded(player)
	player.CharacterAdded:Connect(function(character)onCharacterAdded(character,player)end)
end

Players.PlayerAdded:Connect(onPlayerAdded)

Also there will be false positives if you decide to have a script manually destroy the lowerTorso or the Root motor, for example a lava brick that :Destroys() touching parts.

2 Likes

Just deal with it, you get too many exploiters you should sell Greenpoint to me.