How do I make a part invisible to all players except me?

I would like to try to set the transparency from a part to 1 that change will only happen for others player not for me

Just create a part in the workspace, then change its transparency using a local script. Example:

local part = workspace.Part

local player = game.Players.LocalPlayer

if player.Name == ‘RCTGAMERGg’ then
    part.Transparency = 1
end

With a local script, code runs on the client, not on the server, so this transparency change will only affect what you see, not what other clients see or the server.

3 Likes

Like @dodle120 said, local scripts will only run on the client. So if you ever want to do other things like what you asked, remember to use local scripts.

should be

if player.Name ~= ‘RCTGAMERGg’ then -- ~= instead of ==
    part.Transparency = 1
end
2 Likes

Make sure you have this on the local script
if game.Players.LocalPlayer.Name == “Name_Here” then
workspace.Part.Transparency = 0
end
As people above have already explained it I won’t repeat but instead of checking the name of the player always get the User Id of the player as the name can be changed but the ID cannot.
In case you want to make it for more than 1 person, you can add “and” between the conditions but that is gonna be weary and thus I suggest using making a table and going through it instead .

1 Like