Remote event not firing from outside tool [URGENT]

I really need help with this as I need it done today, because it is a commission. When I try to fire a remote event located in the ReplicatedStorage, it does not fire, because I have a script that detects whether or not it has fired in the ServerScriptService and it has a print statement in it, but nothing is printing. Here is the code for the client LocalScript in the tool:

local mouse = game.Players.LocalPlayer:GetMouse()

mouse.Button1Down:Connect(function()
	script.Parent.Fire:FireServer(mouse.Hit.p)
end)

game:GetService("UserInputService").InputBegan:Connect(function(k, typing)
	if k.KeyCode == Enum.KeyCode.P and script.Parent.Equipped and not typing then
        -- That damn problem happens here
		script.Parent.putBackTool:FireServer("putBackTool", script.Parent.Name, script.Parent)
	end
end)

If you need me to give you the server script code, I will. I’m doing this for a commission and I’ve been trying to fix this for multiple days already and the person, from the looks of it, is not looking so happy.

Is your script the child of remote event or is it in replicated storage ?

The basic description of the hierarchy is there is a tool that gets cloned from the ReplicatedStorage to your inventory once you do something, and also when you press P it should fire a remote event that sets a value to true and you should have the tool back in your inventory

can you share the SS of explorer ?

ok well i have a whole other devforum post on it so i will copy the picture from there

just do

local mouse = mouse
tool.Activated:Connect(function()
remote:FireServer(mouse.Hit.p)
end)

i was typing some mega big script and i’ve just lost it. About that thing, you still have no idea where to put this line?

place it here

i am gonna test that

fdewdfgdewshjuytrgb

it doesnt work bc the remote event itself is not firing

Have you tried the print before firing? Did it print something?

i havent tried a print, but i did do script.Parent:Destroy() bc i was going to make it do that anyways

and that worked
564346y54hj5tyiotjr4

That’s odd
Can you show the server script?

it was literally in the other post thing but oh well

local dss = game:GetService("DataStoreService")
local ds = dss:GetDataStore("InventoryData")


function saveData(p)
	local inventory = {}
	for i, value in pairs(p.Inventory:GetChildren()) do
		inventory[value.Name] = value.Value
	end
	ds:SetAsync(p.UserId, inventory)
end


game.Players.PlayerAdded:Connect(function(p)
	local invFolder = Instance.new("Folder", p)
	invFolder.Name = "Inventory"
	
	for i, item in pairs(game.ReplicatedStorage.Items:GetChildren()) do
		local newValue = Instance.new("IntValue")
		newValue.Name = item.Name
		newValue.Value = 0
		newValue.Parent = invFolder
	end
	
	
	p.CharacterAdded:Connect(function(c)
		c.Humanoid.Touched:Connect(function(hit)
			if hit:FindFirstChild("ITEM") then
				invFolder[hit.Name].Value += 1
				hit:Destroy()
			elseif hit.Parent:IsA("Tool") and hit:FindFirstChild("ITEM") then
				invFolder[hit.Name].Value += 1
				hit:Destroy()
			end
		end)
	end)
	
	saveData(p)
	
	local invData = ds:GetAsync(p.UserId) or {}
	for itemName, itemCount in pairs(invData) do
		invFolder[itemName].Value = itemCount
	end
end)


game.ReplicatedStorage.InventoryRE.OnServerEvent:Connect(function(p, instruction, item, path)
	if instruction == "drop" and p.Inventory:FindFirstChild(item) and p.Inventory[item].Value == 1 then
		p.Inventory[item].Value -= 1
		local newItem = game.ReplicatedStorage.Items[item]:Clone()
		newItem.CFrame = p.Character.HumanoidRootPart.CFrame - p.Character.HumanoidRootPart.CFrame.LookVector * 5
		newItem.Parent = workspace
	elseif instruction == "equip" and p.Inventory:FindFirstChild(item) and p.Inventory[item].Value == 1 then
		p.Inventory[item].Value -= 1
		local newItem = game.ReplicatedStorage.Items[item]:Clone()
		newItem.Parent = p.Backpack
	elseif instruction == "dropTool" and p.Inventory:FindFirstChild(item) and p.Inventory[item].Value == 1 then
		p.Inventory[item].Value -= 1
		local newItem = game.ReplicatedStorage.Items[item]:Clone()
		local newItem2 = newItem.Handle
		newItem2.Parent = workspace
		for i,v in pairs(newItem2:GetChildren()) do
			v:Destroy()
		end
		script.ITEM:Clone().Parent = newItem2
		newItem:Destroy()
		newItem2.CFrame = p.Character.HumanoidRootPart.CFrame - p.Character.HumanoidRootPart.CFrame.LookVector * 5
		newItem2.Name = game.ReplicatedStorage.Items[item].Name
	elseif instruction == "putBackTool" and p.Inventory:FindFirstChild(item) and p.Inventory[item].Value == 0 and path then
		print("fired")
		local newItem = game.ReplicatedStorage.Items[item].Handle:Clone()
		for i, v in pairs(newItem:GetChildren()) do
			if v.Name == "ITEM" then
				continue
			else
				v:Destroy()
			end
		end
		newItem.Name = item
		newItem.CFrame = p.Character.HumanoidRootPart.CFrame - p.Character.HumanoidRootPart.CFrame.LookVector * 5
		newItem.Parent = workspace
	end
end)




game.Players.PlayerRemoving:Connect(saveData)

game:BindToClose(function()
	for i, p in pairs(game.Players:GetPlayers()) do
		saveData(p)
	end
end)

It looks like you’re firing the event that is inside the tool, not in replicated storage

I know i fixed that and it still doesnt work

ok lemme write a script

local instruction = "puttoolback"
local toolName = script.Parent.Name
local path = script.Parent.Parent

remote:FireServer(instruction, toolName, path)