Anti Exploit for Unanchored parts

Hey guys!

I was wondering if there’s a way to stop exploiters from messing with unanchored parts?

What exploiters are doing is making these parts surround them. They’re also making the parts spin really fast which is causing players to fling.

I believe this was a fix but I think it’s broke as of now. NetworkOwnership Exploit Patch (Outdated)

Any help is much appreciated!

It looks like that “Patch” only detects when an exploiter actually changes their simulation radius. They could leave it at the default & still use the exploit, evading detection.
My advice, if you really need to secure certain un-anchored parts, would be to explicitly set the Network Ownership of all your unanchored parts requiring security, to the server. Then, regardless of if the exploiter changes their simulation radius, they won’t be able to use this exploit to move these unanchored parts.

Would this stop them from spinning the parts?

If these parts is not character childrens, then you can just set their network owner as server.

BasePart:SetNetworkOwner()

We’ve tried this, don’t think it’s a solution.

Is it parts from map or character parts?

Parts from the map, it’s pretty much a devproduct. When players buy it, it’ll drop like a part or a bloxy award. Exploiters are joining and then flinging them because they’re unanchored.

This can be fixed with setting network ownership isn’t it?

use

Part:GetNetworkOwner()

If the player is like 60 studs away then well. Their radius cant reach that far. Kick em.
You will have to find the correct simulation radius though so if anyone gets network owner over that you can just boot em from the server.

Part:GetPropertyChangedSignal("Position")Changed:Connect(function()
    local Owner = Part:GetNetworkOwner()
    
    if Owner.Character and (Owner.Character.HumanoidRootPart.Position - Part.Position).Magnitude >= 60 then
      Owner:Kick("Err")
    end
end)

Edit. I’m using character because you cannot get a reliable camera cframe. But you can get a some sort of reliable character.
If a hacker spoofs this, Use the character “Head”. Can’t remove that, Alongside that you can also check if the humanoid is deleted or edited on the server. :smiley:

Update! Tested to see the radius. Its like 45, So 60 should be good. It could be dynamic so i’m not sure. Make sure to ignore this inside of the studio because the studio will just mess about with the engine!

Actually, now that you’ve more fully detailed your problem, I would recommend simply anchoring the parts in this situation.

It seems like there is no real reason to leave the parts unanchored - maybe you wanted to make sure they “drop” to the ground in the correct position?

Just do something like this - >
local playerPosition = player.Character.HumanoidRootPart.Position
local dropSource = playerPosition + Vector3.new(0,15,0)
–create a raycast from drop source, facing down, and make it of length ~25
dropItem.CFrame = CFrame.new(rayCastHitPosition + Vector3.new(0,dropItem.Size.Y/2,0))

or, even simpler, dropItem.CFrame = CFrame.new(playerPosition) --and then just adjust the height so the item is at the correct “height” relactive to the bottom of the player’s character model

I get an error when using that
19:39:44.060 ServerScriptService.AnchorScript:2: attempt to index nil with 'Connect' - Server - AnchorScript:2

That error doesn’t have to do with BasePart:SetNetworkOwner(), something else in your script is causing it to error. You might be able to fix it by using a :WaitForChild() instead of dot index.

workspace:WaitForChild("Model") instead of workspace.Model

can you please share with your code, so we could tell where exactly the problem is

image

I forgot how to code here. I was missing the . between th ) and C for connect

1 Like