Roblox hard crashing when a player joins the game (Problem since 64 bit release)

In my game “Colt 2” there is an anniversary party place where the players can hang out and disco. Completely unknown to me, sometimes players crash when entering it. It only started occuring when the Roblox 64 bit release came out. I assumed Roblox would fix it and they never did. I Emailed Roblox support about it and they told me that It’s an issue of mine. I still don’t know what’s causing it or why.

Breakdown

  • Player joins, gets their .Character property changed as they spawn in, the client hard crashes
  • It is random mostly with no probable cause that I can find
-- player spawn code
function spawnPlayer(v)
	print("start spawning")
--	game.ReplicatedStorage.MissionObjects.Trigs.ReadyPlayer:InvokeClient(v)
	local decode = game.HttpService:JSONDecode(v:WaitForChild("Data"):WaitForChild("Data").Value)
	local Wep = decode.WEP
	local curr = decode.Curr
	local armor = decode.ARMOR

	game.ReplicatedStorage.Remotes.PlayerEnter:Invoke(v, Wep, armor)
	print("spawned")
	v.Character:WaitForChild("Player")
	local IsCop = not not v.Character:FindFirstChild("IsCop")
end
game.Players.PlayerAdded:Connect(function(p)
	--p.CharacterAdded:Wait()
	GiveStartGui(p)
	repeat wait() until p.Character
	p.Character:WaitForChild("HumanoidRootPart")
	spawnPlayer(p)
end)
for i,v in pairs(game.Players:GetPlayers()) do
	GiveStartGui(v)
	repeat wait() until p.Character
	p.Character:WaitForChild("HumanoidRootPart")
	spawnPlayer(v)
end