Is it possible to rename parts in the workspace for certain players but not otherswhile a server is running

Does anyone know if it’s possible to rename parts in the workspace for certain players but not others while a server is running

1 Like

So for example, my part would be called “Tymxnt’s part”, and yours would be like “The_Conductor’s part”?
Is that what you mean?

1 Like

indeed, For all the players assigned to a certain match the part would be “Z” while the players assigned to another match part would be “X”

Yeah, it is probably possible.
I’m not a scripter, but I know some scripting. You’d probably have to use teams, to do it in an easy way, I think.

certain players

Yes, but you need to add a condition, like if the player has over 100 points

1 Like

If you want 1 part to be named differently for different players, you can fire a RemoteEvent to the players that should have that part renamed, and then change the name in a LocalScript.
If you want a part to be named after a player, you can use string.format to do that. More info here.

1 Like

You don’t need to use string.format?

Just do

--client side
game.ReplicatedStorage.NamePart:FireServer()

--server side
game.ReplicatedStorage.NamePart.OnServerEvent:Connect(function(ply)
    Instance.new("Part", workspace).Name = ply.Name
end)
1 Like

If you mean like, for everyone else it’s named a specific thing and for one player another thing, you can do that with FilteringEnabled on and a local script.
Local scripts only run on the client, and therefore will only update stuff on the client unless a remote is fired or something.

If you were to put this in a local script:

workspace:WaitForChild("Part1").Name = "MyPart"

On the server-side it would be named Part1, but for that specific player it will be named MyPart

3 Likes
part.Name = string.format("UnpalatabIe", "%'s part") --> UnpalatabIe's part

If you put the player’s name into the part’s name (that’s what you did) the game might accidentally pick the part instead of player’s character, or the character instead of the part.

1 Like

The game doesn’t refer to the players character purely by name. If you do this in your code, it’s a terrible practice and you should avoid it. Example:

game.Workspace:FindFirstChild(ply.Name) --bad
game.Players:FindFirstChild(ply.Name).Character --not terrible but you should only use if you're passing through the string of the players name and not the instance
game.Players.Player1.Character or game.Players.Player1.CharacterAdded:Wait() --good
1 Like

Here’s what I’m talking about:


(I wanted to reference the part in this case, it picks character instead)

There’s no way of preventing this other than using string.format to change the part’s name/using a different name altogether so that it doesn’t get confused with player’s character.

1 Like