Reload replication not replicating/compiling

  1. What do you want to achieve?
    I have been writing a gun mechanics system, and I was making a reload script so that when the user runs out of ammunition, a boolean value will return as true, and they cannot shoot unless the button ‘R’ is pressed which will trigger the boolean to return as false.

  2. What is the issue?
    In my firing script it returns “out of ammo” but in my reload script it doesn’t run any of the script according to my output, except for variables and the first two events of course. It doesn’t fire the remote event nor does the remote event connect back.

  3. What solutions have you tried so far?
    I have tried adding debounces such as having checks to see if the user has the tool equipped in order to reload, but it didn’t even get as far to check if the boolean is true.

I have also tried using hidden developers to ask for what I did wrong, no response from up to 5 times.

Reload script

local c = script.Parent.Parent:WaitForChild('Configuration')
local rs = game:GetService('ReplicatedStorage')
local uis = game:GetService('UserInputService')
local t = script.Parent.Parent
local equipped = false

	equipped = true

	equipped = false

	if (equipped == true) then
		if (key == Enum.KeyCode.R) then		
			if (c.out.Value == true) then
				local cache = rs:WaitForChild('CacheReload')
				print('server fired')

Connecting script

local rs = game:GetService('ReplicatedStorage')

	if (bool == true) then
		print('out of ammo, server says')
		use.Value = use.Value + 4
		left.Value = left.Value - 4
		bool.Value = false
		print('ammo replenished')

If you can solve my mystery, and understand what I did wrong, please tell me the name of the line and what I did wrong, there are no errors in my output.

Make sure you’ve spelt your remote correctly.
If not then I cannot help