For some reason when I start a Local Server with 4 players, the scripts only seem to work for Player1, Player2, and Player3. Is this an error on my end or on Roblox's end?
I have a custom leaderboard set up and working for Player1, 2, and 3 but it doesn't show any names for Player4.
Below are both scripts that could've caused this somehow.
Server Side
game.ReplicatedStorage.REPlayerJoining.OnServerEvent:Connect(function(playerJ)
if playerJ.PHBS then else
local playerfolder = Instance.new("Folder", playerJ)
playerfolder.Name = "Statistics"
--
local timeplayed = Instance.new("NumberValue", playerJ)
timeplayed.Name = "TimePlayed"
local timeplayedscript = script.TimePlayedScript:Clone()
timeplayedscript.Parent = timeplayed
timeplayedscript.Disabled = false
--
local phbs = Instance.new("IntValue")
phbs.Name = "PHBS"
phbs.Parent = playerJ
end
end)
Client Side
game.Players.PlayerAdded:Connect(function(playerJ)
for i,v in pairs(playersframe:GetChildren()) do
if v:IsA("TextButton") then
v:Destroy()
end
end
for i,v in pairs(game.Players:GetChildren()) do
local ptclone = game.ReplicatedStorage.PlayerTemplate:Clone()
ptclone.Name = v.Name
ptclone.PlayerName.Text = v.Name
ptclone.Parent = playersframe
end
--
game.ReplicatedStorage.REPlayerJoining:FireServer()
end)
game.Players.PlayerRemoving:Connect(function(playerL)
playersframe[playerL.Name]:Destroy()
--
game.ReplicatedStorage.REPlayerLeaving:FireServer()
end)

1 comment
There is little to nothing we can do to help without any scripts. Please post the code so we can assist you further.