Tool with ScreenGui desynchronizes Server and Client when dropped

This bug report involves these tools: broken tools.rbxm (3.7 KB)

The bug occurs in Test Server and Online play. To activate the bug, select Broken Tool and press Backspace. Notice that the tool stays stuck to the Character’s arm instead of being placed in the air in front of the Character.

Reset, select the Not Broken Tool, and press Backspace. The tool is properly parented to Workspace in the Server model.

After dropping the Broken Tool, one can see that the Server and Client models are desynchronized. The Client believes the Tool is in Workspace, while the Server believes the Tool is owned by the Character. When in this state, the tool cannot be picked up by any Players, and dropping subsequent tools creates additional odd behavior.

Observed behavior: Tool with GUI desynchronizes Server and Client when dropped
Expected behavior: Tool with GUI drops properly

As a free model developer, this bug is inhibiting my work to create tools that can be shared with friends. Specifically, I am developing a model train system that allows players to share remotes with each other to allow the other player to control the same train. I have already spent several hours of development time creating this functionality, so to have a bug like this completely halt that ability is rather annoying.

Both tools have LocalScripts that are identical except for one line. This is the script of the Broken Tool. Can you spot the line that causes the Tool to break?

local Tool = script.Parent
local ActiveGui
local Player = game:GetService("Players").LocalPlayer
local gui = Tool:WaitForChild("ControllerGui")

local function OnEquip()
	if ActiveGui then return end
	ActiveGui = gui:Clone()
	ActiveGui.Parent = Player.PlayerGui
end

local function OnUnequip()
	if ActiveGui then
		ActiveGui:Destroy()
	end
	ActiveGui = nil
end

Tool.Equipped:connect(OnEquip)
Tool.Unequipped:connect(OnUnequip)

If you guessed ActiveGui.Parent = Player.PlayerGui, then you’re correct! In the Not Broken Tool script, that line is commented out. Why you would guess that, I have no idea, which is why I am writing this bug report.