[Local server testing is BROKEN] StarterPlayerScripts/StarterCharacterScripts create empty duplicates in local servers

Simple bug. How to replicate:

  • Start a local server/player instance in Studio.
  • Check the player’s clientside StarterPlayer instance.
    image

This breaks testing in games that require items from these services, as they will often check the empty instances instead of the ones with assets inside.

7 Likes

We’ve been experiencing this issue for the last couple of days. It means we can’t use Local Server testing at all.

I have seen this once before a few weeks back, but it appeared to go away on its own. Unfortunately that doesn’t seem to be the case this time.

My colleague and I are both running the latest version (see screenshot) on MacOS Catalina 10.15.3.

image

1 Like

I’m surprised there isn’t more activity on this thread. Isn’t Local Server Testing a crucial part of building a game in Roblox Studio?

It’s been totally broken for almost a week for everyone on my team. How do people test multiplayer features without it? Have people found a workaround? Or, perhaps it’s not affecting all users right now?

1 Like

I’m not sure if the bug is the same on PC as it is on Mac, but I’ve had the issue too. But the only reason it broke my game was because I tried to get children under StarterPlayerScripts, since my code referred to the empty, duplicate folder. To get around this I just referred to the “valid” folder, which is the non-empty one:

	local starterPlayerScripts
		
	-- The duplicate starterPlayerScripts folder is always empty, so just get the non-empty one
	for _, child in pairs(StarterPlayer:GetChildren()) do
		if (child.Name == "StarterPlayerScripts") and (#child:GetChildren() > 0) then
			starterPlayerScripts = child
			break
		end
	end
	assert(starterPlayerScripts)

You can do the same to StarterCharacterScripts

1 Like

Thanks! That was super helpful and led me to a solution that works for us. I realise now why we are having such a major issue but others likely aren’t. We had a bunch of scripts importing modules directly from StarterPlayerScripts:

require(game:GetService('StarterPlayer').StarterPlayerScripts.SomeCoolModule)

They were called in a bunch of scripts that we relied on to get the client to start and were failing because of the duplicate directories.

Instead, i’ve moved those modules to ReplicatedStorage and removed any absolute imports to StarterPlayerScripts. And now duplicated StarterPlayerScripts directories isn’t a problem for us. If it was, I’d just use @Toxicator1’s solution.

:heart:

Hey Polyhex,

Thanks for the report, we will take a look

2 Likes