Blaster Issue - Reloading

Hello! I seem to be having issues with 2 parts of my code.

Firstly when you click R it’s meant to reload but it seems to refuse to do that.

ActionService:BindAction("Reload", Reload, false, Enum.KeyCode.R) --//Reload with R\\--

Secondly I have another issue with telling the script when you are reloading.

local function Reload(plr)
	--//Initialize\\--
	if not CanReload() then return
		
		--//Reload\\--
		Reloading = true ---//This is the part of the script with an error.
		ReloadSound:Play()
		
		--//Handle Ammo\\--
		local Needed = MagSize.Value - Ammo.Value
		ReserveAmmo.Value = ReserveAmmo.Value - Needed
		Ammo.Value = MagSize.Value
		
		--//Ensure Reserved ammo does not go negative\\--
		if ReserveAmmo.Value < 0 then
			Ammo.Value = Ammo.Value + ReserveAmmo.Value --//Add the nevative with the Reserved\\--
			Ammo.Value = 0 --//Resets Ammo\\--
		end
	end
end

Errors:

This is the error for the Reloading = true
Players.tyler09456.Backpack.DH-17.Scripts.BackendScript:69: Expected ‘end’ (to close ‘then’ at line 66), got ‘=’

This is the error for the R for reload.
Players.tyler09456.Backpack.DH-17.Scripts.FrontendScript:170: attempt to call a nil value

2 Things, youre missing a end and also you have a nil value on line 170, maybe tell us which lines they are?

I can’t figure out where the end needs to be, don’t think I haven’t tried to fix the errors I ain’t that incompetent. And also the error says and I put a —// for where they are saying where. If you look yall see. Such as here: Reloading = true —//This is the part of the script with an error.