Yeah, I made a script that crashes studio and the Roblox client

I don’t know how to report this but I get the standard Roblox Crash whenever the Tab key is pressed.
image

Code:

local Remotes = game.ReplicatedStorage.Remotes

local Events = Remotes.Events
local Functions = Remotes.Functions

local MainUI = script.Parent
local Backpack = MainUI.Backpack
local ToolBar = MainUI.ToolBar
local Loot = MainUI.Loot

local CloseMenus;

local CAS = game:GetService("ContextActionService")


local function OpenBackpack(Name, State, Object)
	if State == Enum.UserInputState.Begin then
		Backpack.Visible = true
	end
	CAS:BindAction("CloseUI", CloseMenus, false, Enum.KeyCode.Tab)
end

CloseMenus = function(Name, State, Object)
	if State == Enum.UserInputState.Begin then
		Backpack.Visible = false
		Loot.Visible = false
		CAS:BindAction("Backpack", OpenBackpack, false, Enum.KeyCode.Tab)
	end
end

local function OpenLoot()
	Loot.Visible = true
	OpenBackpack("Backpack", Enum.UserInputState.Begin)
	CAS:BindAction("CloseUI", CloseMenus, false, Enum.KeyCode.Tab)
end


CAS:BindAction("Backpack", OpenBackpack, false, Enum.KeyCode.Tab)
Events.LootEvent.OnClientEvent:Connect(OpenLoot)

Not going through the hassle of reporting a bug because I don’t really care if it gets fixed. I just thought it was pretty cool. I will let the forum admins refer this to the right section.

1 Like

Are you sure its not your function thats crashing studio :thinking:

try firing the function without having it be assigned to tab.

I fixed the code by removing the reference to the unassigned variable. Studio shouldn’t be crashing with this regardless of the reason. I was playing around with different methods to see what was faster and ended up causing a studio and client crash. If it was a standard recursive crash or a memory leak it would result in studio freezing and the thread being forced to yield. This is a solid fatal error crash, there is a big difference.