When I start a multi-client simulation in Studio…
… it creates players with the same name…
How can I change this?
When I start a multi-client simulation in Studio…
… it creates players with the same name…
How can I change this?
It’s the display name being defaulted to Player, their actual names are not such. I feel like this could be a feature request/bug report because I don’t understand why that’s the default.
You can’t even change display names, so no fix.
From what I know, you can’t change their names. However, the good news is their Id’s aren’t the same. However, unless you’re naming somebodies property or making a sign with someones name on, I would recommend using player IDs instead of names and display names, as a player can’t change their ID but if they change their name any data/ work associated with them wouldn’t work for them
Yes, I know. But since it’s a simulation, visually the name should be “Player_1” and “Player_2” and so on…
Visually it is currently confusing.
Agreed, but as of right now you can’t really do anything to change it by default.
If you’re looking for a solution, I quickly wrote a simple code which will display the users’ real names using BillboardGuis.
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local function createBillboard(user)
local char = user.Character or user.CharacterAdded:Wait()
if (not RunService:IsStudio()) or (not char) or (not char.PrimaryPart) or char:FindFirstChild("RealUsernameDisplay") then
return
end
local hum = char:FindFirstChildWhichIsA("Humanoid")
if hum then
hum.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
end
local bb = Instance.new("BillboardGui")
bb.Name = "RealUsernameDisplay"
bb.Size = UDim2.new(6,0,1,0)
bb.StudsOffset = Vector3.new(0,3,0)
bb.Parent = char
bb.Adornee = char.Head
local label = Instance.new("TextLabel")
label.Text = user.Name
label.TextColor3 = Color3.new(1,1,1)
label.Size = UDim2.new(1,0,1,0)
label.Font = Enum.Font.SourceSansSemibold
label.TextStrokeTransparency = 0.5
label.TextScaled = true
label.BackgroundTransparency = 1
label.Parent = bb
end
Players.PlayerAdded:Connect(function(player)
createBillboard(player)
player.CharacterAdded:Connect(function(char)
createBillboard(player)
end)
end)
I hope this helps.
Note that this should only run in studio, but feel free to change that.