Is there any way I can keep a part in workspace on the server from replicating to the client?

Hey,
I’m working on a racing game and it uses checkpoints. I’d like for those checkpoints to be invisible to the client. Is there any way I can keep these parts from replicating to the client, since the client doesn’t really need them? I don’t want exploiters to be able to teleport to my checkpoints.

If this were the other way around I could just take advantage of FilteringEnabled not replicating, or putting the parts in the camera, but since it is the server we’re talking about it’s a little more confusing. I need the parts to be in Workspace so they can work with the .Touched event and :GetTouchingParts() API. Thanks!

No, there isn’t, although you could use region3 out of your checkpoint parts. The region3 would then be used to check for parts and not the part itself.

The problem with Region3’s is that they do not allow for rotation. Most of the checkpoints are okay like this, but for corner cutting / things of that nature, working without rotation is a major setback and ultimately is really finicky.

There was actually a module that addresses the use case for rotation, it was made by egomoose.

1 Like

There’s no simple way to do this.

Your best bet would be to handle the checkpoint system server-side.

You could keep the checkpoint position values inside your server script and then check to see if a player is within a certain distance.

local Checkpoint1Position = Vector3.new(50,50,50)

if (HumanoidRootPart.Position - Checkpoint1Position).magnitude <= 25 then
    -- player has made it to checkpoint 1
end

My old system actually used this… I forgot that it existed but thanks for sharing that with me again. I actually took the PartToRegion function from that old code, but I didn’t have the updated model in my inventory so clearly it must have been something different. Thank you for that resource!

@Secretum_Flamma as for handling it server sided, the checkpoints and corner cuts are already handled server sided. I wanted to make it so that, since there is no real reason for the client to have the checkpoints that the server uses to verify progress completion, if I could confine the parts to the server while still maintaining the .Touched functionality of the parts in workspace. Basically local parts, but on the server instead of the client.

@Intrance This would work really well if my checkpoints could be spherical. Unfortunately, since corner cuts and things of that nature need to be extremely precise, I need to keep the physical shape of the blocks so I can resize and edit them without getting a headache from the bordom lol. Also because spheres for a finish line would give a player in the middle an unfair advantage over the person towards the outside edge.

Consider having Parts with Transparency = 1 and using the Zones+ module by ForeverHD to detect when players enter / leave them - it’s intended for serverside use and supports blocks (plus a variety of other region types)

1 Like

You could delete the part on the client

If it’s handled correctly server-side, you could just set it to be invisible, .Touched events won’t work if the part doesn’t exist on the client AFAIK. You could call Destroy:() in a LocalScript in ReplicatedFirst then server-side use some hacky-method involving Magnitude checks but it doesn’t really seem necessary.

Exploiters do not need an object to teleport to since they simply retrieve the position value of that object. For example, if you had a platform for your checkpoint, well, now they can just teleport to that instead by retrieving the central position of that object. They can also just find a way to get a position value to teleport to, an object isn’t needed.

The best way to patch this is a teleportation anti exploit, you can constantly check positional changes as a method of doing this.

The closest you can get is only moving parts via :BulkMoveTo() without firing property changes unless specified which could make changes to parts (CFrame) invisible to the clients.