Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Any way to make a part not exist for certain players, yet it exists for others?

Asked by 15 days ago
Edited 15 days ago

I'm working on security for my game and could REALLY use a feature that hides a part's existence from some, but not for others. To be more clear: I want the explorer tab for the client to not even recognize the existence of a part for one player, yet at the same time allow its existence for a different player.

I am not looking for an answer like this:

part.Transparency = 1

Or like this:

part.CanCollide = false

...as both of these will still allow the part to show up in the workspace for everyone. I have a feeling that it's not possible, but I wanted to ask just in case. Thank you.

[Edit] Remember that I'm doing this for security, so changes to the local side won't help. I'm looking for a way to stop the server from naturally sending a part in the workspace to the client.

2 answers

Log in to vote
1
Answered by 15 days ago
Edited 15 days ago

You could use a LocalScript in ReplicatedFirst and a Script in ServerScriptService to make so-called "local parts", which only appear for the local player. These parts will not be synchronized, however. They probably should be anchored. However, local only hacks will be able to move these bricks (if they are anchored)

Script:

game.Players.PlayerAdded:Connect(function(player)
    local Event=Instance.new("RemoteEvent", game.ReplicatedStorage)
    if player.Name == "YourCertainPlayer" or "SomeoneYouDontDislike" then
        Event:FireClient(player, 1, 2, 3)
    end
end)

LocalScript:

game.ReplicatedStorage.RemoteEvent.OnClientEvent:Connect(function()
    local YourInstance = Instance.new("Part", game.Workspace)
    YourInstance.Position = Vector3.new(X,Y,Z)
    YourInstance.Size = Vector3.new(X,Y,Z)
    YourInstance.Anchored=true
    YourInstance.Material = Enum.Material.Brick
end)

If you are looking for an exploit-free method without having it in the server, im sorry but that is currently impossible unless there is something weird out there.

0
I think this is about the closest I'm going to get to what I want. I can actually make it work with this concept, but it'll be a lot more scripting than I had hoped. Thanks for the answer, I'll accept it. SteelMettle1 268 — 15d
Ad
Log in to vote
0
Answered by 15 days ago

I believe this can occur if you do it through a LocalScript.

From a localscript, do this:

part.Transparency = 1
part.CanCollide = false
0
Thank you for your answer, but this won't work for what I'm trying to accomplish. An exploiter could easily change anything inside a local script. Remember that I'm doing this for security. SteelMettle1 268 — 15d

Answer this question