Why isn't the remote firing?

Hello, I’m working on a accessory editor for my game and I’ve ran into a problem. When I try firing the remote to equip it to the character. Nothing happens. I don’t get an error. Straight up nothing happens. Please help me figure out why this is happening.

Client:

-- Services --
local Players = game:GetService('Players')
local ReplicatedStorage = game:GetService('ReplicatedStorage')
-- Variables --
local Player = Players.LocalPlayer
local Character = Player.Character
local Jersey = Character:WaitForChild('Hitboxes'):FindFirstChild('Hitbox')
--
local Libraries = ReplicatedStorage:WaitForChild('Libraries')
local CharacterLibrary = Libraries:WaitForChild('Character')
local _Accessories = require(CharacterLibrary:FindFirstChild('_Accessories'))
local RemoteEvent = ReplicatedStorage:WaitForChild('AccessoryEvent')
-- UI --
local Items = script.Parent:WaitForChild('Items')
---

-- Arm Accessories --
Items.QBPlay.On.MouseButton1Click:Connect(function()
	RemoteEvent:FireServer('QBHand','Left Arm',true)
end)

Server:

-- Accessories --
ReplicatedStorage.AccessoryEvent.OnServerEvent:Connect(function(Player,Accessory,BodyPart,Boolean)
	-- Check x2 --
	if Accessory == 'QBHand' then
		if Player.Character:FindFirstChild(BodyPart,true) and Boolean then
			_Accessories:Add(Player.Character,Accessory,Player.Character:FindFirstChild(BodyPart.Name),Player.Character:GetAttribute('BodyType'))
		end
	end
end)
---
1 Like

Try using print statements to find what’s going wrong.

Items.QBPlay.On.MouseButton1Click:Connect(function()
	RemoteEvent:FireServer('QBHand','Left Arm',true)
	print("Fired")
end)
ReplicatedStorage.AccessoryEvent.OnServerEvent:Connect(function(Player,Accessory,BodyPart,Boolean)
	print("received")
	if Accessory == 'QBHand' then
		print("Accessory is QBHand")
		if Player.Character:FindFirstChild(BodyPart,true) and Boolean then
			print("Idk what to put here")
			_Accessories:Add(Player.Character,Accessory,Player.Character:FindFirstChild(BodyPart.Name),Player.Character:GetAttribute('BodyType'))
		end
	end
end)

image

Doesn’t fire anything

2 Likes

Try using break points and see what’s the problem.

What is that? Never heard of it [char2.0]

may this link make you fully understand them

basically whenever you add a breakpoint, it makes you go to a script line that you added a breakpoint to and shows you whether this line has runned. If it doesn’t shows you the line that runned inside your game then there might be an error.

Ohhh debugging you should of said that

1 Like

Do you have that security boolean enabled in your game settings that allows remote events being fired? I forgot its name :thinking:


This right here?

1 Like

It seems that it doesn’t even detect when I’m clicking :sob:

Yes this one was what I was asking.


-- Accessories --
ReplicatedStorage.AccessoryEvent.OnServerEvent:Connect(function(Player,Accessory,BodyPart,Boolean)
	-- Check x2 --
	if Accessory == 'QBHand' then
		if Player.Character:FindFirstChild(BodyPart,true) and Boolean then
			_Accessories:Add(Player.Character,Accessory,Player.Character:FindFirstChild(BodyPart.Name),Player.Character:GetAttribute('BodyType'))
		end
	end
end)

Inside the if Player.Character:FindFirstChild(BodyPart,true) and Boolean then scope I see a _Accessories variable, can you tell me what’s that?

function Module:Add(Character,Accessory,BodyPart,Type)
	-- Check --
	if not Character:FindFirstChild('Jersey'):FindFirstChild('Accessories') then
		-- Create --
		local Folder1 = Instance.new('Folder',Character:FindFirstChild('Jersey'))
		local Folder2 = Instance.new('Folder',Folder1)
		local Folder3 = Instance.new('Folder',Folder1)
		local Folder4 = Instance.new('Folder',Folder1)
		local Folder5 = Instance.new('Folder',Folder1)
		--
		Folder1.Name = 'Accessories'
		Folder2.Name = 'Head'
		Folder3.Name = 'Torso'
		Folder4.Name = 'Arms'
		Folder5.Name = 'Legs'
	end
	-- Check x2 --
	if Character:FindFirstChild('Jersey') then
		-- Top --
		if Accessory == 'Glove' then
			local Glove = Accessories:FindFirstChild(Type):FindFirstChild('Glove'):Clone()
			Glove.Parent = Character:FindFirstChild('Jersey'):FindFirstChild('Accessories'):FindFirstChild('Arms')
			-- Check --
			if Type == 'SlimBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),Glove,Glove,BodyPart,CFrame.new(-0,0.913,0),Vector3.new(0,-90,0))
			elseif Type == 'FitBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),Glove,Glove,BodyPart,CFrame.new(-0,0.913,0),Vector3.new(0,-90,0))
			elseif Type == 'BigBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),Glove,Glove,BodyPart,CFrame.new(-0,0.913,0),Vector3.new(0,-90,0))
			end
		elseif Accessory == 'QBHand' then
			local QBHand = Accessories:FindFirstChild(Type):FindFirstChild('QBHand'):Clone()
			QBHand.Parent = Character:FindFirstChild('Jersey'):FindFirstChild('Accessories'):FindFirstChild('Arms')
			-- Check --
			if Type == 'SlimBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),QBHand,QBHand,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			elseif Type == 'FitBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),QBHand,QBHand,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			elseif Type == 'BigBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),QBHand,QBHand,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			end
		elseif Accessory == 'Armband' then
			local Armband = Accessories:FindFirstChild(Type):FindFirstChild('Armband'):Clone()
			Armband.Parent = Character:FindFirstChild('Jersey'):FindFirstChild('Accessories'):FindFirstChild('Arms')
			-- Check --
			if Type == 'SlimBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),Armband,Armband,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			elseif Type == 'FitBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),Armband,Armband,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			elseif Type == 'BigBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),Armband,Armband,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			end
		elseif Accessory == 'TurfTape' then
			local TurfTape = Accessories:FindFirstChild(Type):FindFirstChild('Turf Tape'):Clone()
			TurfTape.Parent = Character:FindFirstChild('Jersey'):FindFirstChild('Accessories'):FindFirstChild('Arms')
			-- Check --
			if Type == 'SlimBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),TurfTape,TurfTape,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			elseif Type == 'FitBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),TurfTape,TurfTape,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			elseif Type == 'BigBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),TurfTape,TurfTape,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			end
		elseif Accessory == 'WristTape' then
			local WristTape = Accessories:FindFirstChild(Type):FindFirstChild('Wrist Tape'):Clone()
			WristTape.Parent = Character:FindFirstChild('Jersey'):FindFirstChild('Accessories'):FindFirstChild('Arms')
			-- Check --
			if Type == 'SlimBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),WristTape,WristTape,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			elseif Type == 'FitBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),WristTape,WristTape,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			elseif Type == 'BigBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),WristTape,WristTape,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			end
		elseif Accessory == 'Wristband' then
			local Wristband = Accessories:FindFirstChild(Type):FindFirstChild('Wristband'):Clone()
			Wristband.Parent = Character:FindFirstChild('Jersey'):FindFirstChild('Accessories'):FindFirstChild('Arms')
			-- Check --
			if Type == 'SlimBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),Wristband,Wristband,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			elseif Type == 'FitBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),Wristband,Wristband,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			elseif Type == 'BigBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),Wristband,Wristband,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			end
		elseif Accessory == 'Sleeve' then
			local Sleeve = Accessories:FindFirstChild(Type):FindFirstChild('Sleeve'):Clone()
			Sleeve.Parent = Character:FindFirstChild('Jersey'):FindFirstChild('Accessories'):FindFirstChild('Arms')
			-- Check --
			if Type == 'SlimBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),Sleeve,Sleeve,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			elseif Type == 'FitBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),Sleeve,Sleeve,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			elseif Type == 'BigBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),Sleeve,Sleeve,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			end
		elseif Accessory == 'ArmBrace' then
			local ArmBrace = Accessories:FindFirstChild(Type):FindFirstChild('Arm Brace'):Clone()
			ArmBrace.Parent = Character:FindFirstChild('Jersey'):FindFirstChild('Accessories'):FindFirstChild('Arms')
			-- Check --
			if Type == 'SlimBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),ArmBrace,ArmBrace,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			elseif Type == 'FitBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),ArmBrace,ArmBrace,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			elseif Type == 'BigBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),ArmBrace,ArmBrace,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			end
			-- Bottom --
		elseif Accessory == 'LegSleeve' then
			local LegSleeve = Accessories:FindFirstChild(Type):FindFirstChild('LegSleeve'):Clone()
			LegSleeve.Parent = Character:FindFirstChild('Jersey'):FindFirstChild('Accessories'):FindFirstChild('Arms')
			-- Check --
			if Type == 'SlimBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),LegSleeve,LegSleeve,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			elseif Type == 'FitBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),LegSleeve,LegSleeve,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			elseif Type == 'BigBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),LegSleeve,LegSleeve,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			end
		elseif Accessory == 'LegBand' then
			local LegBand = Accessories:FindFirstChild(Type):FindFirstChild('LegBand'):Clone()
			LegBand.Parent = Character:FindFirstChild('Jersey'):FindFirstChild('Accessories'):FindFirstChild('Arms')
			-- Check --
			if Type == 'SlimBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),LegBand,LegBand,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			elseif Type == 'FitBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),LegBand,LegBand,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			elseif Type == 'BigBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),LegBand,LegBand,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			end
		elseif Accessory == 'LegBrace' then
			local LegBrace = Accessories:FindFirstChild(Type):FindFirstChild('Leg Brace'):Clone()
			LegBrace.Parent = Character:FindFirstChild('Jersey'):FindFirstChild('Accessories'):FindFirstChild('Arms')
			-- Check --
			if Type == 'SlimBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),LegBrace,LegBrace,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			elseif Type == 'FitBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),LegBrace,LegBrace,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			elseif Type == 'BigBody' then
				-- Weld --
				Module.Weld(string.sub(BodyPart.Name,1,1),LegBrace,LegBrace,BodyPart,CFrame.new(-0,0.61,0),Vector3.new(0,-90,0))
			end
		end
	end
end

Back when I was using chat commands to put them on it worked perfectly fine. I has nothing to do with the module

You said that you implemented a system where doing some sort of a message (chat) along with that accessory handler worked perfectly fine. Can you merge both of them and edit them a bit?