LocalScript replication is broken - game is unplayable

Join the game, you never spawn in or anything. Check the dev console client view and you get this stack trace. Starting happening today.

UPDATE: The error is unrelated to the broken game. The game broke because LocalScripts are no longer copied from StarterGui into PlayerGui. Writing a simple patch completely fixed the problem:

local contents = game.StarterGui:GetChildren()
for i, v in next, contents do
    v.Parent = nil
end

game.Players.PlayerAdded:Connect(function(player)
    for i, v in next, contents do
        v:Clone().Parent = player:WaitForChild'PlayerGui'
    end
end)
19 Likes

One of the players for my games reported the same issue. This should be looked into

Edit: adding a few précisions.

The player who reported it to me sent me a screenshot containing the same error stack. It was also today.

1 Like

Other games seem fine:

So if this breaks gameplay, then that seems game-specific, other games are apparently handling the error gracefully. Make sure to follow How to post a Bug Report in the future (not even a game link is mentioned in this post as-is).

Well my game is suffering from this also. It causes ping to spike to 500+ making the game unplayable. None of the scripts break, it just makes the game unplayable due to the lag it causes.

Game link: [ Content Deleted ] - Roblox

Console:
https://gyazo.com/6c7edded513861783f6a2c5269f98c96

Do notice the scroll bar on the right side and how tiny it is, because the console is just spammed with these messages.

When I join a fresh server I have on average 80 - 110 ping. but after about 20 mins it goes to anywhere between these ranges 200 - 400, 500 - 700 and 800 - 1000. Rejoining the server doesn’t fix the problem as the console gets spammed right away with the errors when you rejoin.

From the stack trace I would assume its the playerlist core script? I know its nothing I have done.

Added an update to the OP with more information

I am experiencing the same issue as seen:

However this doesn’t appear to be fatally breaking my game, there is just about 20 errors that all look just about identical to the one I posted. Something is obviously going on with CoreScripts from a recent update roblox made, as I don’t recall seeing this in any of my places as of about 3 weeks ago. Hope this bug gets fixed soon. Looks related to the Leaderboard and leaderstats.

1 Like

This is happening also to me. But many games are fine

I don’t know if the issue has been resolved but I’m able to join the game without any issues (120 people are playing also)

:hearts:

Any update on this? I’ve been getting these errors on my client side for a few days now. It’s not breaking anything, but I think it’s causing a bit of lag on my end. Screenshot by Lightshot

@Sharksie Would you mind updating the post title as it is a bit misleading?

On another note I am also still experiencing these Corescript errors as well. Anyone have any ideas as Surgo said on when we can expect a fix?

1 Like

Those corescript errors are due to the Roblox playerlist unable to handle unconventional/subpar leaderstat manipulation by the game and does not affect the game itself.
Also, standalone LocalScripts which reset on spawn should be placed into StartCharacterScripts instead of StarterGui.

Can you give an example of unconventional / subpar leaderstat manipulation?

Because as far as I know it’s just value objects in a folder, don’t understand how it’s possible to do a subpar manipulation of such a value.

1 Like

In this case it looks like the leaderstats folder wasnt added straight away or was reparented for whatever reason.
You should always, with the PlayerAdded event and no yielding before/during,

  1. Create the folder and value instances and set their properties
  2. Parent the values to the folder
  3. Parent the folder to the Player

Repro steps, working on version 0.434.0.405736 in Studio and in-game

  1. Create a Baseplate place
  2. Add a server script to ServerScriptService and insert the following code:
local PlayersService = game:GetService("Players")

PlayersService.PlayerAdded:Connect(function(player)
	local leaderstats = Instance.new("Folder")
	leaderstats.Name = "leaderstats"
	
	local stat = Instance.new("IntValue")
	stat.Name = "Test Stat"
	stat.Parent = leaderstats
	
	leaderstats.Parent = player	
end)
  1. Test with two clients in studio, or publish and then test with two clients in-game
  2. Once both have connected, make either one of the clients leave/disconnect
  3. Observe the error messages in the remaining client’s output/console:
[...]
- CoreGui [...] PlayerEntry:361: attempt to index nil with 'Test Stat'
[...]

Repro file:
repro.rbxl (18.2 KB)

4 Likes