Fe gun kit GUI error

So I use FE gun kit edited and I’ve been getting this error whenever I bought the FE gun kit item in one of my shops I made.

This would literally break the whole item and it wouldn’t be useable, any solutions?

are you sure MeleeButton is inside MobileButtons?

Disable your scripts until it’s in the StarterPack, StarterGear, Backpack or Character.

image

how would I do that?||||||||||

oops i might have removed the meleebutton in the gui, but i just put it in and it still isnt working

So yeah heres the actual problem

As i said.

local Tool = script.Parent
for _, Script in pairs(Tool:GetDescendants()) do
	if Script:IsA("Script") or Script:IsA("LocalScript") or Script:IsA("ModuleScript") then
		if Script.Disabled == false then
			Script.Disabled = true
			Tool.AncestryChanged:Connect(function(Ancestry) -- I don't know if this is the old or new ancestry.
				if Ancestry:IsA("Backpack") or game:GetPlayerFromCharacter(Ancestry) then
					Script.Disabled = false
				end
			end)
		end
	end
end

to check if the melee button exist

GunGui.ChildAdded:Connect(function(thing)
	if thing.Name == "MobileButtons" then
		print("Gui found")
	else
		print("No gui found")
	end
end)

Where would i put the script?|||||

Inside the tool… Max characters.

The problem is still happening, not sure why.

Did you get rid of melee button in the gui?

Its not only the melee button, its all the mobile button guis that get this issue. also i did not get rid of the melee button gui

Try using :waitforchild instead

1 Like

I have the same issue, some weapons work fine and some of them don’t work 85% of the time. (They work perfectly fine in Studio for some reason) The GunScript_Local is the same as in the weapons that don’t break and using :WaitForChild() didn’t help the slightest. Any thoughts on how could I fix it?


screenshot4

You’re not doing :WaitForChild() on GUI.MobileButtons, you’re doing it on the children of MobileButtons.

1 Like

Oh, I didn’t think about it that way. It finally works now. Thank you so much for your reply!

1 Like

so would i do it like

local MeleeButton = GUI:WaitForChild("MobileButtons").MeleeButton