Problems with FE Gun kit tool name

Hey! I am having problems with changing the FE Gun kit tool name. The default tool name for the FE Gun kit is “Pistol”, but as soon as I change the tool name, the kit breaks. Is there a fix to this?

1 Like

Is there a part named handle in the tool? If you’re changing the tool name itself then it shouldn’t be a problem.

Check if in any scripts you define the name of the tool as “Tool” instead of “Pistol.”

1 Like

you’re changing the “Handle” Name? or the tool name itself?
if so you’re not changing the handle,
its would return an error cuz you changed the ToolName if its scripts are not in the tool,
so you must change the ToolName in the script too.

1 Like

I am changing the tool name itself. Where can I find the Tool name in the script?

1 Like

is it returning an error though?
and if the scripts are in the tool i don’t think thats the issue.
click CTRL + F and Search for the tool name in there.

Yes, the output is returning an error.

is it coming from the tool’s script?

I can’t tell, because my game is running too many scripts. I can only tell there’s an error.

1 Like

I changed the tool name it self and the kit broke. There is a part named “handle” in the tool.

1 Like

What do you mean by “kit broke”

I think there is a script checking if the tool name is pistol prob that

None of the scripts function. when I equip the tool, it only displays the model, that’s it.

I checked all the scripts and there is no mention of “pistol”

Can you send the beginning of the scripts? Where it doesn’t work

Just try debugging using print.

I can give you the FE gun kit if you need it.

I’m not asking for the kit, I am asking for the code so I can see what’s wrong.

Do you need the server code or the local code?

I need the code that isn’t working. Just paste it in a post here.
@waskiller11

What line does it now work?

local Debris = game:GetService("Debris")
local Workspace = game:GetService("Workspace")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")

local Tool = script.Parent
local Handle = Tool:WaitForChild("Handle")
local Player
local Character
local Humanoid
local Grip2
local Handle2

local Modules = ReplicatedStorage:WaitForChild("Modules")

local Module = require(Tool:WaitForChild("Setting"))
local DamageModule = require(Modules.DamageModule)

local ChangeMagAndAmmo = script:WaitForChild("ChangeMagAndAmmo")
local InflictTargetMelee = script:WaitForChild("InflictTargetMelee")

if Module.DualEnabled then
	Handle2 = Tool:WaitForChild("Handle2", 1)
	if Handle2 == nil and Module.DualEnabled then error("\"Dual\" setting is enabled but \"Handle2\" is missing!") end
end

local MagValue = script:FindFirstChild("Mag") or Instance.new("NumberValue")
MagValue.Name = "Mag"
MagValue.Value = Module.AmmoPerMag
MagValue.Parent = script
local AmmoValue = script:FindFirstChild("Ammo") or Instance.new("NumberValue")
AmmoValue.Name = "Ammo"
AmmoValue.Value = Module.LimitedAmmoEnabled and Module.Ammo or 0
AmmoValue.Parent = script
local HeatValue = script:FindFirstChild("Heat") or Instance.new("NumberValue")
HeatValue.Name = "Heat"
HeatValue.Value = 0
HeatValue.Parent = script

if Module.IdleAnimationID ~= nil or Module.DualEnabled then
	local IdleAnim = Instance.new("Animation")
	IdleAnim.Name = "IdleAnim"
	IdleAnim.AnimationId = "rbxassetid://"..(Module.DualEnabled and 53610688 or Module.IdleAnimationID)
	IdleAnim.Parent = Tool
end
if Module.FireAnimationID ~= nil then
	local FireAnim = Instance.new("Animation")
	FireAnim.Name = "FireAnim"
	FireAnim.AnimationId = "rbxassetid://"..Module.FireAnimationID
	FireAnim.Parent = Tool
end
if Module.ReloadAnimationID ~= nil then
	local ReloadAnim = Instance.new("Animation")
	ReloadAnim.Name = "ReloadAnim"
	ReloadAnim.AnimationId = "rbxassetid://"..Module.ReloadAnimationID
	ReloadAnim.Parent = Tool
end
if Module.ShotgunClipinAnimationID ~= nil then
	local ShotgunClipinAnim = Instance.new("Animation")
	ShotgunClipinAnim.Name = "ShotgunClipinAnim"
	ShotgunClipinAnim.AnimationId = "rbxassetid://"..Module.ShotgunClipinAnimationID
	ShotgunClipinAnim.Parent = Tool
end
if Module.ShotgunPumpinAnimationID ~= nil then
	local ShotgunPumpinAnim = Instance.new("Animation")
	ShotgunPumpinAnim.Name = "ShotgunPumpinAnim"
	ShotgunPumpinAnim.AnimationId = "rbxassetid://"..Module.ShotgunPumpinAnimationID
	ShotgunPumpinAnim.Parent = Tool
end
if Module.HoldDownAnimationID ~= nil then
	local HoldDownAnim = Instance.new("Animation")
	HoldDownAnim.Name = "HoldDownAnim"
	HoldDownAnim.AnimationId = "rbxassetid://"..Module.HoldDownAnimationID
	HoldDownAnim.Parent = Tool
end
if Module.EquippedAnimationID ~= nil then
	local EquippedAnim = Instance.new("Animation")
	EquippedAnim.Name = "EquippedAnim"
	EquippedAnim.AnimationId = "rbxassetid://"..Module.EquippedAnimationID
	EquippedAnim.Parent = Tool
end
if Module.SecondaryFireAnimationEnabled and Module.SecondaryFireAnimationID ~= nil then
	local SecondaryFireAnim = Instance.new("Animation")
	SecondaryFireAnim.Name = "SecondaryFireAnim"
	SecondaryFireAnim.AnimationId = "rbxassetid://"..Module.SecondaryFireAnimationID
	SecondaryFireAnim.Parent = Tool
end
if Module.SecondaryShotgunPump and Module.SecondaryShotgunPumpinAnimationID ~= nil then
	local SecondaryShotgunPumpinAnim = Instance.new("Animation")
	SecondaryShotgunPumpinAnim.Name = "SecondaryShotgunPumpinAnim"
	SecondaryShotgunPumpinAnim.AnimationId = "rbxassetid://"..Module.SecondaryShotgunPumpinAnimationID
	SecondaryShotgunPumpinAnim.Parent = Tool
end
if Module.AimAnimationsEnabled and Module.AimIdleAnimationID ~= nil then
	local AimIdleAnim = Instance.new("Animation")
	AimIdleAnim.Name = "AimIdleAnim"
	AimIdleAnim.AnimationId = "rbxassetid://"..Module.AimIdleAnimationID
	AimIdleAnim.Parent = Tool
end
if Module.AimAnimationsEnabled and Module.AimFireAnimationID ~= nil then
	local AimFireAnim = Instance.new("Animation")
	AimFireAnim.Name = "AimFireAnim"
	AimFireAnim.AnimationId = "rbxassetid://"..Module.AimFireAnimationID
	AimFireAnim.Parent = Tool
end
if Module.AimAnimationsEnabled and Module.AimSecondaryFireAnimationID ~= nil then
	local AimSecondaryFireAnim = Instance.new("Animation")
	AimSecondaryFireAnim.Name = "AimSecondaryFireAnim"
	AimSecondaryFireAnim.AnimationId = "rbxassetid://"..Module.AimSecondaryFireAnimationID
	AimSecondaryFireAnim.Parent = Tool
end
if Module.AimAnimationsEnabled and Module.AimChargingAnimationID ~= nil then
	local AimChargingAnim = Instance.new("Animation")
	AimChargingAnim.Name = "AimChargingAnim"
	AimChargingAnim.AnimationId = "rbxassetid://"..Module.AimChargingAnimationID
	AimChargingAnim.Parent = Tool
end
if Module.TacticalReloadAnimationEnabled and Module.TacticalReloadAnimationID ~= nil then
	local TacticalReloadAnim = Instance.new("Animation")
	TacticalReloadAnim.Name = "TacticalReloadAnim"
	TacticalReloadAnim.AnimationId = "rbxassetid://"..Module.TacticalReloadAnimationID
	TacticalReloadAnim.Parent = Tool
end
if Module.InspectAnimationEnabled and Module.InspectAnimationID ~= nil then
	local InspectAnim = Instance.new("Animation")
	InspectAnim.Name = "InspectAnim"
	InspectAnim.AnimationId = "rbxassetid://"..Module.InspectAnimationID
	InspectAnim.Parent = Tool
end
if Module.ShotgunReload and Module.PreShotgunReload and Module.PreShotgunReloadAnimationID ~= nil then
	local PreShotgunReloadAnim = Instance.new("Animation")
	PreShotgunReloadAnim.Name = "PreShotgunReloadAnim"
	PreShotgunReloadAnim.AnimationId = "rbxassetid://"..Module.PreShotgunReloadAnimationID
	PreShotgunReloadAnim.Parent = Tool
end
if Module.MinigunRevUpAnimationID ~= nil then
	local MinigunRevUpAnim = Instance.new("Animation")
	MinigunRevUpAnim.Name = "MinigunRevUpAnim"
	MinigunRevUpAnim.AnimationId = "rbxassetid://"..Module.MinigunRevUpAnimationID
	MinigunRevUpAnim.Parent = Tool
end
if Module.MinigunRevDownAnimationID ~= nil then
	local MinigunRevDownAnim = Instance.new("Animation")
	MinigunRevDownAnim.Name = "MinigunRevDownAnim"
	MinigunRevDownAnim.AnimationId = "rbxassetid://"..Module.MinigunRevDownAnimationID
	MinigunRevDownAnim.Parent = Tool
end
if Module.ChargingAnimationEnabled and Module.ChargingAnimationID ~= nil then
	local ChargingAnim = Instance.new("Animation")
	ChargingAnim.Name = "ChargingAnim"
	ChargingAnim.AnimationId = "rbxassetid://"..Module.ChargingAnimationID
	ChargingAnim.Parent = Tool
end
if Module.SelectiveFireEnabled and Module.SwitchAnimationID ~= nil then
	local SwitchAnim = Instance.new("Animation")
	SwitchAnim.Name = "SwitchAnim"
	SwitchAnim.AnimationId = "rbxassetid://"..Module.SwitchAnimationID
	SwitchAnim.Parent = Tool
end
if Module.BatteryEnabled and Module.OverheatAnimationID ~= nil then
	local OverheatAnim = Instance.new("Animation")
	OverheatAnim.Name = "OverheatAnim"
	OverheatAnim.AnimationId = "rbxassetid://"..Module.OverheatAnimationID
	OverheatAnim.Parent = Tool
end
if Module.MeleeAttackEnabled and Module.MeleeAttackAnimationID ~= nil then
	local MeleeAttackAnim = Instance.new("Animation")
	MeleeAttackAnim.Name = "MeleeAttackAnim"
	MeleeAttackAnim.AnimationId = "rbxassetid://"..Module.MeleeAttackAnimationID
	MeleeAttackAnim.Parent = Tool
end

--Viewmodel
if Module.VMIdleAnimationID ~= nil then
	local VMIdleAnim = Instance.new("Animation",Tool)
	VMIdleAnim.Name = "VMIdleAnim"
	VMIdleAnim.AnimationId = "rbxassetid://"..Module.VMIdleAnimationID
end
if Module.VMFireAnimationID ~= nil then
	local VMFireAnim = Instance.new("Animation",Tool)
	VMFireAnim.Name = "VMFireAnim"
	VMFireAnim.AnimationId = "rbxassetid://"..Module.VMFireAnimationID
end
if Module.VMReloadAnimationID ~= nil then
	local VMReloadAnim = Instance.new("Animation",Tool)
	VMReloadAnim.Name = "VMReloadAnim"
	VMReloadAnim.AnimationId = "rbxassetid://"..Module.VMReloadAnimationID
end
if Module.VMShotgunClipinAnimationID ~= nil then
	local VMShotgunClipinAnim = Instance.new("Animation",Tool)
	VMShotgunClipinAnim.Name = "VMShotgunClipinAnim"
	VMShotgunClipinAnim.AnimationId = "rbxassetid://"..Module.VMShotgunClipinAnimationID
end
if Module.VMShotgunPumpinAnimationID ~= nil then
	local VMShotgunPumpinAnim = Instance.new("Animation",Tool)
	VMShotgunPumpinAnim.Name = "VMShotgunPumpinAnim"
	VMShotgunPumpinAnim.AnimationId = "rbxassetid://"..Module.VMShotgunPumpinAnimationID
end
if Module.VMHoldDownAnimationID ~= nil then
	local VMHoldDownAnim = Instance.new("Animation",Tool)
	VMHoldDownAnim.Name = "VMHoldDownAnim"
	VMHoldDownAnim.AnimationId = "rbxassetid://"..Module.VMHoldDownAnimationID
end
if Module.VMEquippedAnimationID ~= nil then
	local VMEquippedAnim = Instance.new("Animation",Tool)
	VMEquippedAnim.Name = "VMEquippedAnim"
	VMEquippedAnim.AnimationId = "rbxassetid://"..Module.VMEquippedAnimationID
end
if Module.SecondaryFireAnimationEnabled and Module.VMSecondaryFireAnimationID ~= nil then
	local VMSecondaryFireAnim = Instance.new("Animation",Tool)
	VMSecondaryFireAnim.Name = "VMSecondaryFireAnim"
	VMSecondaryFireAnim.AnimationId = "rbxassetid://"..Module.VMSecondaryFireAnimationID
end
if Module.VMSecondaryShotgunPump and Module.VMSecondaryShotgunPumpinAnimationID ~= nil then
	local VMSecondaryShotgunPumpinAnim = Instance.new("Animation",Tool)
	VMSecondaryShotgunPumpinAnim.Name = "VMSecondaryShotgunPumpinAnim"
	VMSecondaryShotgunPumpinAnim.AnimationId = "rbxassetid://"..Module.VMSecondaryShotgunPumpinAnimationID
end
if Module.TacticalReloadAnimationEnabled and Module.VMTacticalReloadAnimationID ~= nil then
	local VMTacticalReloadAnim = Instance.new("Animation",Tool)
	VMTacticalReloadAnim.Name = "VMTacticalReloadAnim"
	VMTacticalReloadAnim.AnimationId = "rbxassetid://"..Module.VMTacticalReloadAnimationID
end
if Module.InspectAnimationEnabled and Module.VMInspectAnimationID ~= nil then
	local VMInspectAnim = Instance.new("Animation",Tool)
	VMInspectAnim.Name = "VMInspectAnim"
	VMInspectAnim.AnimationId = "rbxassetid://"..Module.VMInspectAnimationID
end
if Module.ShotgunReload and Module.PreShotgunReload and Module.VMPreShotgunReloadAnimationID ~= nil then
	local VMPreShotgunReloadAnim = Instance.new("Animation",Tool)
	VMPreShotgunReloadAnim.Name = "VMPreShotgunReloadAnim"
	VMPreShotgunReloadAnim.AnimationId = "rbxassetid://"..Module.VMPreShotgunReloadAnimationID
end
if Module.VMMinigunRevUpAnimationID ~= nil then
	local VMMinigunRevUpAnim = Instance.new("Animation",Tool)
	VMMinigunRevUpAnim.Name = "VMMinigunRevUpAnim"
	VMMinigunRevUpAnim.AnimationId = "rbxassetid://"..Module.VMMinigunRevUpAnimationID
end
if Module.VMMinigunRevDownAnimationID ~= nil then
	local VMMinigunRevDownAnim = Instance.new("Animation",Tool)
	VMMinigunRevDownAnim.Name = "VMMinigunRevDownAnim"
	VMMinigunRevDownAnim.AnimationId = "rbxassetid://"..Module.VMMinigunRevDownAnimationID
end
if Module.ChargingAnimationEnabled and Module.VMChargingAnimationID ~= nil then
	local VMChargingAnim = Instance.new("Animation",Tool)
	VMChargingAnim.Name = "VMChargingAnim"
	VMChargingAnim.AnimationId = "rbxassetid://"..Module.VMChargingAnimationID
end
if Module.SelectiveFireEnabled and Module.VMSwitchAnimationID ~= nil then
	local VMSwitchAnim = Instance.new("Animation",Tool)
	VMSwitchAnim.Name = "VMSwitchAnim"
	VMSwitchAnim.AnimationId = "rbxassetid://"..Module.VMSwitchAnimationID
end
if Module.BatteryEnabled and Module.VMOverheatAnimationID ~= nil then
	local VMOverheatAnim = Instance.new("Animation",Tool)
	VMOverheatAnim.Name = "VMOverheatAnim"
	VMOverheatAnim.AnimationId = "rbxassetid://"..Module.VMOverheatAnimationID
end
if Module.MeleeAttackEnabled and Module.VMMeleeAttackAnimationID ~= nil then
	local VMMeleeAttackAnim = Instance.new("Animation")
	VMMeleeAttackAnim.Name = "VMMeleeAttackAnim"
	VMMeleeAttackAnim.AnimationId = "rbxassetid://"..Module.VMMeleeAttackAnimationID
	VMMeleeAttackAnim.Parent = Tool
end

ChangeMagAndAmmo.OnServerEvent:Connect(function(Player, Mag, Ammo, Heat)
	MagValue.Value = Mag
	AmmoValue.Value = Ammo
	HeatValue.Value = Heat
end)

InflictTargetMelee.OnServerInvoke = function(Player, ClientModule, TargetHumanoid, TargetTorso, Damage, Misc, Critical, Hit)
	_G.SecureSettings(Player, Tool, ClientModule) --Second layer
	local TrueDamage = (Hit and Hit.Name == "Head" and Damage[2]) and Damage[1] * Damage[3] or Damage[1]
	if Player then
		if TargetHumanoid and TargetHumanoid.Health ~= 0 and TargetTorso and DamageModule.CanDamage(TargetHumanoid.Parent, Character, Module.FriendlyFire) then
			while TargetHumanoid:FindFirstChild("creator") do
				TargetHumanoid.creator:Destroy()
			end
			local creator = Instance.new("ObjectValue",TargetHumanoid)
			creator.Name = "creator"
			creator.Value = Player
			Debris:AddItem(creator, 5)
			if Critical[1] then
				local CriticalChanceRandom = Random.new():NextInteger(0, 100)
				if CriticalChanceRandom <= Critical[2] then
					TargetHumanoid:TakeDamage(math.abs(TrueDamage * Critical[3]))
				else
					TargetHumanoid:TakeDamage(math.abs(TrueDamage))
				end			
			else
				TargetHumanoid:TakeDamage(math.abs(TrueDamage))
			end
			if Misc[1] > 0 then --knockback
				local Shover = Character.HumanoidRootPart or Character.Head
				local Duration = 0.1
				local Speed = Misc[1] / Duration
				local Velocity = (TargetTorso.Position - Shover.Position).Unit * Speed
				local ShoveForce = Instance.new("BodyVelocity")
				ShoveForce.MaxForce = Vector3.new(1e9, 1e9, 1e9)
				ShoveForce.Velocity = Velocity
				ShoveForce.Parent = TargetTorso
				Debris:AddItem(ShoveForce, Duration)
			end
			if Misc[2] > 0 and Character.Humanoid and Character.Humanoid.Health ~= 0 then --lifesteal
				Character.Humanoid.Health = Character.Humanoid.Health + (TrueDamage * Misc[2])
			end
			if Misc[3] then	--affliction
				local roll = math.random(1, 100)
				if roll <= Misc[5] then
					if not TargetHumanoid.Parent:FindFirstChild(Misc[4]) then
						local Debuff = script:FindFirstChild(Misc[4]):Clone()
						Debuff.creator.Value = creator.Value
						Debuff.Parent = TargetHumanoid.Parent
						Debuff.Disabled = false
					end
				end
			end		
		end
	else
		warn("Unable to register damage because player is no longer existing here")
	end
end

Tool.Equipped:Connect(function()
	Player = Players:GetPlayerFromCharacter(Tool.Parent)
	Character = Tool.Parent
	Humanoid = Character:FindFirstChild("Humanoid")
	if Module.DualEnabled and Workspace.FilteringEnabled then
		Handle2.CanCollide = false
		local LeftArm = Tool.Parent:FindFirstChild("Left Arm") or Tool.Parent:FindFirstChild("LeftHand")
		local RightArm = Tool.Parent:FindFirstChild("Right Arm") or Tool.Parent:FindFirstChild("RightHand")
		if RightArm then
			local Grip = RightArm:WaitForChild("RightGrip", 0.01)
			if Grip then
				Grip2 = Grip:Clone()
				Grip2.Name = "LeftGrip"
				Grip2.Part0 = LeftArm
				Grip2.Part1 = Handle2
				--Grip2.C1 = Grip2.C1:inverse()
				Grip2.Parent = LeftArm
			end
		end
	end
end)

Tool.Unequipped:Connect(function()
	if Module.DualEnabled and Workspace.FilteringEnabled then
		Handle2.CanCollide = true
		if Grip2 then
			Grip2:Destroy()
		end
	end
end)

Tool.AncestryChanged:Connect(function()
	if not Tool:IsDescendantOf(game) then
		if Module.DualEnabled and Workspace.FilteringEnabled then
			Handle2.CanCollide = true
			if Grip2 then
				Grip2:Destroy()
			end
		end
	end
end)

I don’t know. the output didn’t show