Studio Crash - Using :CreateLocalPlayer() on Server Context View

There were no crash logs.

Info

Studio Version: Version 0.655.0.6551095 (64bit) and 656

Description

Roblox Studio crashes after I used game.Players:CreateLocalPlayer() on the Server Context View. It only crashed if I had that script there mentioned in the re-production steps.

Re-production Steps

Happens with and without the Storybook, so it doesn’t matter.

You, might need to Start the game once, use game.Players:CreateLocalPlayer() on the Server Context View. Then stop the game, and then repeat the process.

  1. Create a new game using the Baseplate Template
  2. Put this Script inside ServerScriptService and name it Leaderboards, name doesn’t matter, it’s just from In-experience leaderboards | Documentation - Roblox Creator Hub
Script
local Players = game:GetService("Players")

local function leaderboardSetup(player)
	local leaderstats = Instance.new("Folder")
	leaderstats.Name = "leaderstats"
	leaderstats.Parent = player

	local gold = Instance.new("IntValue")
	gold.Name = "Gold"
	gold.Value = 0
	gold.Parent = leaderstats
end

-- Connect the "leaderboardSetup()" function to the "PlayerAdded" event
Players.PlayerAdded:Connect(leaderboardSetup)
  1. Now run the game, aka. F5 mode.
  2. Switch your view to the Server
  3. Run game.Players:CreateLocalPlayer()
  4. Observe

Expected Result

No crash.

Actual Result

It crashes after I run game.Players:CreateLocalPlayer()

Sidenotes

Summary

:sob: