Studio Has a Chance of Crashing When Running Scripts

Hello, I’ve recently been experiencing an issue with Roblox Studio crashing whenever I perform an action that requires a script to run. This crashing doesn’t happen all the time, but it has a chance of happening.

Here’s a video to better understand what’s happening:

In the video, when I press a button, it runs a script. The button was seen working before, but the second time the script ran, it crashed studio. This has a chance of happening with any script.

Things I’ve tried:

  • Restarting Studio
  • Restarting PC
  • Reinstalling Studio
  • Updating Drivers and Windows

System Specs:

  • OS: Windows 11 Home
  • CPU: Ryzen 5 5600
  • GPU: NVIDIA GeForce GTX 1070 Ti

Beta Features:

  • Assistant Mesh Generation
  • Avatar Joint Upgrade
  • Dragger QoL Improvements
  • Haptic Effects
  • Improved Constraint Tool
  • Incremental typechecking and autocomplete in studio
  • Next Gen Explorer
  • Next Gen Studio Preview
  • Preferred Text Size Setting
  • Revamped Asset Manager
  • Script Sync [Early Preview]
  • Studio soild modeling improvements
  • Texture Generator
  • UIDragDetectors
  • Unified Lighting
  • Video Uploads

is it possible to show us the code? It might be due to constant loops without yielding in your code

Hi,

Thank you for reporting this issue. To further troubleshoot, would it be possible to send us your Studio logs and maybe your placefile in a private message?

One option to try would be to turn off all Beta features and see if this still happen.

Thank you!

Sure, Heres the code within the button: (Sorry for the late reply):

local Part = game.Workspace:WaitForChild("Color_Part")
local Click = script.Parent.ClickDetector
local Sound = script.Parent.Click
local Sound2 = game.Workspace.PartEffects.ColorChange.Paint
local ParticleEmitter = game.Workspace.PartEffects.ColorChange.ParticleEmitter
local ButtonPart = script.Parent
local TimeDownForAnimation = 0.1

-- Services
local tweenService = game:GetService("TweenService")

-- Potions (For tween animation)
local pos1 = ButtonPart.Position.X
local pos2 = ButtonPart.Position.Y - 0.3
local pos2d = 0.5
local pos3 = ButtonPart.Position.Z

-- Tween
local tweenButtonInInfo = TweenInfo.new(TimeDownForAnimation, Enum.EasingStyle.Sine, Enum.EasingDirection.In)
local tweenButtonIn = tweenService:Create(ButtonPart, tweenButtonInInfo, {Position = Vector3.new(pos1, pos2, pos3)})

local tweenButtonOutInfo = TweenInfo.new(TimeDownForAnimation, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
local tweenButtonOut = tweenService:Create(ButtonPart, tweenButtonOutInfo, {Position = Vector3.new(pos1, pos2d, pos3)})

Click.MouseClick:Connect(function()
	Sound:Play()
	
	-- Animation
	tweenButtonIn:Play()
	task.wait(TimeDownForAnimation)
	tweenButtonOut:Play()
	
	-- Button Box Lights
	local Light1 = script.Parent.ButtonBox.Lighting.L1
	local Light2 = script.Parent.ButtonBox.Lighting.L2
	local Light3 = script.Parent.ButtonBox.Lighting.L3
	local Light4 = script.Parent.ButtonBox.Lighting.L4

	Light1.Material = Enum.Material.Neon
	Light2.Material = Enum.Material.Neon
	Light3.Material = Enum.Material.Neon
	Light4.Material = Enum.Material.Neon

	task.wait(0.1)

	Light1.Material = Enum.Material.Glass
	Light2.Material = Enum.Material.Glass
	Light3.Material = Enum.Material.Glass
	Light4.Material = Enum.Material.Glass
	
	
	-- Randomizer
	Part.Color = Color3.new(math.random(0, 250),math.random(0, 250), math.random(0, 250))
	print("The Parts Color Has Been Randomized")
end)

The main part of the button is when it randomizes the color in the “Randomizer” section. However, it doesn’t appear that there are any repeating loops. This code is simular to the ones in the other random buttons just fyi :slight_smile:

Okay, thanks for the reply! I’ll use studio without beta features and I’ll get a hold of my logs on the computer I was using when I have acess to it next. (I’m currently on vacation)

2 Likes