Game crashes/disconnects when equipping this one tool

Hello,
I’ve discovered a bug. So, I’ve made a jointed tool (uses BodyAttach & Motor6D, not Handle), and currently it is the only one that has animations using curve-animations.

Every time I equip the tool, it would either close my Roblox App, or kick me with the error code 277 (lost connection). However, there are some odds:

  1. It does not happen in Studio simulation, but it does in real-time game.
  2. There is a VERY small chance it won’t happen, but that can happen again when re-equipping.

Here’s the tool.Equipped thread in a LocalScript:

tool.Equipped:Connect(function(mouse)
	grip = Instance.new("Motor6D")
	grip.Name = "ToolGrip"
	grip.Parent = char["Right Arm"]
	grip.Part0 = char["Right Arm"]
	grip.Part1 = tool.BodyAttach

	RStorage.WeaponRemotes.GripWeld:FireServer(tool, grip, true, "Right Arm", tool.BodyAttach)

	isEquipped = true
	canShoot = true
	
	local animator:Animator = char.Humanoid:FindFirstChild("Animator")
	IDLE = animator:LoadAnimation(script.Idle) --<<-- HIGHLIGHT
	
	IDLE:Play()
	
	speedOri = char.Humanoid.WalkSpeed	
	char.Humanoid.WalkSpeed = speedOri - 0.5
	char.Humanoid.AutoRotate = false

	MOUSE_ = mouse
	MOUSE_.TargetFilter = workspace.MouseIgnore
	MOUSE_.Icon = "rbxasset://textures/GunCursor.png"
	
	ammoGui = script.AmmoGui:Clone()
	ammoGui.Parent = game.Players.LocalPlayer.PlayerGui
end)

This bug started happening about 4 days ago, and I am sure there was an app update. I have tried searching forum topics with the same issue, but found none. My guess is, this has something to do with curve-animations? Or maybe the script itself?? This has to be fixed.

Thank you for reading :slightly_smiling_face:

2 Likes

Try to see if a script is using the most rate(/s) or memory from the console when equipping your tool.

2 Likes

Checked it. Still the usual rate and total memory.
If it was, wouldn’t my Studio crash too? I think not, my laptop has 12 GB RAM.

1 Like

Did you view it on both client and server? And the crash would depend on your device true.

If it still ain’t working try to disable the scripts connected to the tool one by one and equip your tool to see if it crashes. if it doesn’t then there’s something with the set up of your tool or it’s the script you’ve disabled.

1 Like

Yes, I did.


Okay, clearing things up. It seems like it was the script itself.
I went to the tool.Unequipped section and noticed a missing line, where it should be breaking the Arm-Motor6D via RemoteEvent :sweat:

After that, I checked in-game 3 times, and it looks like the bug stopped showing up. I wonder, how does that make an impact? :thinking:

1 Like

Well I am not sure about that one. You might want to look into that. Just to double check but are you sure you don’t have some while true do functions?

Just RunService.Stepped at the bottom for RootPart lookAt.
But now I’m claiming that this has been resolved. Thank you for showing up :slightly_smiling_face: