What could be causing this crash?

I’d look in serverscript storage first and if you can’t find anything there make sure to check the creators of your plugins to make sure they’re the real creator of the plugin and not a random account.

1 Like

If other people are experiencing this its not just an issue on your end. Think about any scripts or plugins you added recently, and as previously stated

1 Like

I would recommend saving your game as a RBXLX file (this will remove any GUI images that have been inserted through studio), opening this in a text editor (Notepad++ for Windows, BBEdit for macOS for some examples) and searching for some of the telltale signs such as a backpack in the InsertService

I’d also recommend telling all developers that have access to your game to disable all plugins

2 Likes

Here’s the ServerScriptService during a testing session where one player has joined and everyone’s client is hanging.
image
The only things not by me are the ChatServiceRunner and the SoundDispatcher which I’ve checked and seem like they are Roblox scripts.

1 Like

This could possibly be a plugin issue then, check what plugins you are using. One of them might have a malicious script.

1 Like

There can be a liability that your game could be infected by installing plugins, this is made by @Christbru01 to combat infections hidden in your plugins, which you can go here. But please do check your Developer Console because that may be the case for why your game isn’t functioning correctly

1 Like

Please post all text printed in the output window when clients start hanging. Can you reproduce this in Studio with a local server with multiple players?

1 Like

I’ve checked the Developer Console in-game and during a local server and I couldn’t see anything out the ordinary :confused:

I can’t seem to open the Developer Console anymore but when I could there weren’t any errors which showed of malicious scripts.

Open the output and command bar, paste the following LUA one-liner and send the results

print(" --game.InsertService--") for i,v in pairs(game:GetService("InsertService"):GetChildren()) do print(v.Name) end print(" -- If there was anything above this line and below the start line, that's most likely malicious --")```
1 Like

Use the link I’ve attached above to check for viruses or infections in your plugins

1 Like

> print(“game.InsertService”) for i,v in pairs(game:GetService(“InsertService”):GetChildren()) do print(v.Name) end print(" – If there was anything above this line and below the start line, that’s most likely malicious --")

game.InsertService

– If there was anything above this line and below the start line, that’s most likely malicious –

Nope!

This could be down to a few issues. If you have replicated this in Studio and it is still not working then it is definitely a game issue and not another user adding exploits.

This means it is most likely from a plugin or script. If you could post the developer console or the output you got in studio would be great. Or let us know what plugins you are using and we could figure out if any of them could possibly be malicious.

2 Likes

Okay, well the plugins are as follows:

Image

(Have deactivated them all now but made no difference)

The output shows nothing, and only clients after the second seem to experience issues.

Image

In a real game, players reported failing to load in and randomly crashing + weird backpack issues not loading:

Image

If this is in studio please use the Output window insead of the console you open ingame. I’ve had it refuse to load output history before, and it can’t be opened to show client output when the client hangs.

Enable it in View category of the topbar.

Also disabling malicious plugins won’t help if they’ve already dropped malicious scripts into your game.

2 Likes

Okay, so - Progress.

The output doesn’t show anything at all, which is pretty useless if I’m honest.

I tried disabling literally every localscript in the client and now they load in properly, which is real weird.
I haven’t touched those scripts at all.

This can be Human error which can be made from your scripts. Because you mentioned you haven’t tried the game properly other than on studio, these issues may be occurring now which you didn’t intend to happen or the malicious scripts have been put into your game by the plugins. However, looking from those Plugins, those developers seem recognised enough not to have anything bad inside of those plugins.
Check your scripts for loops

1 Like

Do you have any code running in replicatedfirst or in playerscripts that may loop indefinitely or wait for a child indefinitely?

Enable client scripts one at a time until you find the one causing the issue.

1 Like

None loop indefinitely, I’m very careful about that.

There is a few that may be using WaitForChild() indefinitely but they usually just throw a warning to the output rather that have a complete meltdown.

Strange that the backpack isn’t loading as well, so check any scripts that have something to do with that.

1 Like

Okay, after many disabling I’ve been lead to this localscript, which causes a complete crash SOMETIMES :roll_eyes: .
The only thing which may be causing the error is something to do with the remote event/function. Apart from that I can’t understand why this script in particular is having a hissy fit.

Code
local lval, xval = game.ReplicatedStorage.LevelXpChanged2:InvokeServer()

local levelGui = script.Parent.LevelFrame
local xpAdd = levelGui.XPAlert
local maxXP = 10
local currentLevel = 1
local currentXP = 0
local tempAdding = 0
local check = 0

local function xpAlert(val)
	spawn(function()
		if xpAdd.Visible == false then
			local rand = math.random(-1000,1000)
			check = rand
			tempAdding = val
			xpAdd.Position = UDim2.new(0,-10,1,0)
			xpAdd.TextTransparency = 0
			xpAdd.TextStrokeTransparency = 0.5
			xpAdd.Text = "+ " .. tostring(tempAdding) .. " XP"
			xpAdd.Visible = true
			xpAdd:TweenPosition(UDim2.new(0,-10,.25,0),Enum.EasingDirection.Out, Enum.EasingStyle.Sine, .5)
			wait(2)
			if check == rand then
				for i = 0,1,0.05 do
					if check ~= rand then break end
					xpAdd.TextTransparency = i
					xpAdd.TextStrokeTransparency = 0.5 + i/2
					wait()
				end
				xpAdd.Visible = false
			end
		else
			local rand = math.random(-1000,1000)
			check = rand
			tempAdding = tempAdding + val
			xpAdd.Text = "+ " .. tostring(tempAdding) .. " XP"
			wait(2)
			if check == rand then
				for i = 0,1,0.05 do
					if check ~= rand then break end
					xpAdd.TextTransparency = i
					xpAdd.TextStrokeTransparency = 0.5 + i/2
					wait()
				end
				tempAdding = 0
				xpAdd.Visible = false
			end
		end
	end)
end

local function updateAll(values)
	local l = values[1]
	local x = values[2]
	
	local diff = 0
	
	if currentLevel == l then
		diff = x - currentXP
	else
		while true do
			diff = diff + ((20 + ((currentLevel*currentLevel)*2)))
			currentLevel = currentLevel + 1
			if currentLevel == l then 
				diff = diff - currentXP + x
				break
			end
		end
	end
	
	currentLevel = l
	currentXP = x
	
	levelGui.LevelLabel.Text = "Level " .. tostring(l)
	maxXP = 20 + ((l*l)*2)
	
	if x then
		xpAlert(diff)
	end

	levelGui.XPLabel.Text = "- " .. tostring(x) .. "/" .. tostring(maxXP)
	levelGui.BackXP.FrontXP:TweenSize(UDim2.new(math.min(1,x/maxXP),0,1,0), Enum.EasingDirection.Out, Enum.EasingStyle.Sine,.5)
end

updateAll({lval, xval})

game.ReplicatedStorage.LevelXpChanged.OnClientEvent:Connect(function(values)
	updateAll(values)
end)

EDIT: There is a while loop in the code, but it’s never been a problem before so why would it affect everything now?