Is there a way to create true server-sided part?

Is there a possible way to create a part that only exists on server, without the client ever knowing it?

Physical interaction is needed, which is why it must be a part btw

I would like to create a fog of war system that only the server can interact and sends the entity data to the client which makes it impossible to exploit to reveal hidden entities

There’s only 1 topic that talked about this, but the solution method requires the client to delete the part manually, which exploiter can just disables anyway

3 Likes

It’s impossible to make an object only exist on the server without deleting it on the client. If you want a part to be safe from exploiters, you’ll need to have the part stored in ServerStorage and replicated into workspace when you want the part to be visible. What do you mean by “physical interaction” ?

1 Like

You can write a script that can cache fog of war Parts and place them back if their reference parts are destroyed.

I would not be too worried about this situation from a business point of view. There are much more important things to work on for a game, especially if it is not finished yet. You can always secure the game later on.

Dummy parts? Have the server maintain them is position, but don’t have any player interaction. Something that is OK the player/client sees.

local part = Instance.new("Part")
part.Parent = game.ServerStorage

Instances inside the ServerStorage folder will never replicate to the client (unless otherwise specified to do so by reparenting the instance to a directory which replicates to the client).

By physical interaction I meant by the part working with physic along with other similar parts, it needs to be in workspace in order to do so

I don’t fully understand StreamingEnabled, but could you possibly keep something server sided by simply keeping it in the streaming range?

ohhhh, that might work actually, I’ll try that out

Not really, but this is the closest.

Just make the part on the server, now here is now to delete it on the client ONLY.

Make a LocalScript inside of ReplicatedFirst and the script should be this:

(partpath):Destroy() -- deletes the part on the CLIENT ONLY, not the server.
script:Destroy() -- this line is to prevent an exploiter from using something like synapse to find out that there is a part that gets deleted on the client, so it deletes the script after the part is deleted from the client.

Of course make sure to put multiple lines (one for each server only part) to destroy it right as the player loads in. ReplicatedFirst is used for this because whatever script is in there, are the first scripts to be ran as the game is loaded. The part(s) will no longer be on the client, but it will still be on the server.

There’s an extremely stupid hack you can use to do this. The server, despite having no concept of a viewport, does not have a nil CurrentCamera, so parent the part to CurrentCamera. Cameras do not replicate across the client/server boundary. It is additionally able to simulate physics because Cameras are in the Workspace but you should expect physics throttles.

Besides this stupid hack, no there’s no real way to make a true server-sided part. Clients can circumvent local deletion as you’ve already pointed out and both server-only services are not in the physics pipeline. A part needs to be in the Workspace to simulate physics.

19 Likes

Oh mai god dude, how have I not notice server’s camera can do this, it of course is very hacky, but it’s the only way to make a true serversided part in workspace, thank you

1 Like

Make a local script that deletes one server sided part from the client basically making it fully server sided.