RemoteEvent doesn't update with variable

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want the proximity prompt to say in a chat bubble if the user has an item in hand or not!

  2. What is the issue? Include screenshots / videos if possible!
    The proximity prompt will only relay that it is “false”, even if it is in hand. I tried something similar to this with the same script where I wanted it to relay the name of an item back, but only worked once I dropped said item and picked it back up.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Looked through tons of threads and I am sure this is a really easy fix just I’m still pretty new and can’t seem to figure it out D:
    After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

Local Script (On Flashlight):

script.Parent.Equipped:Connect(function()
	equip = true
	print("Equipped!")
end)

script.Parent.Unequipped:Connect(function()
	equip = false
	print("Unequipped!")
end)

game.ReplicatedStorage.RemoteEvent:FireServer(equip)

Server Script (On Block):

local proxy = script.Parent
local talky = game:GetService("Chat")
local item = 3 --this is just for a default chat bubble, it says 3 when no item has been selected D:
proxy.Triggered:Connect(function()
	print("Tada!")
	talky:Chat(script.Parent.Parent, "Hi!")
	wait(0.1)
	game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player, item2)
		print(item)
		item = item2
	end)
	talky:Chat(script.Parent.Parent,item)
	
end)

Any help would mean a lot!! For more specifics of why I am trying to implement this, I want to make it where an NPC can tell what item is in your hand and tell you about it! Right now though I am just trying to relay if its equipped or not, as trying to make it say the name was equally as hard D:

Local Script (On Flashlight):

local equip = false

script.Parent.Equipped:Connect(function()
	equip = true
	print("Equipped!")
	game.ReplicatedStorage.RemoteEvent:FireServer(equip)
end)

script.Parent.Unequipped:Connect(function()
	equip = false
	print("Unequipped!")
	game.ReplicatedStorage.RemoteEvent:FireServer(equip)
end)

Server Script (On Block):

local proxy = script.Parent
local talky = game:GetService("Chat")
local item = 3 --default chat bubble value

proxy.Triggered:Connect(function()
	print("Tada!")
	talky:Chat(script.Parent.Parent, "Hi!")
	wait(0.1)
	game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player, equip)
		print(equip)
		if equip then
			item = "Item in hand"
		else
			item = "No item in hand"
		end
		talky:Chat(script.Parent.Parent, item)
	end)
end)

Hi!! Thank you for this as it now the NPC does say if it is equipped or not, though if I could ask would it be possible at all to prevent it spamming multiple messages if interacted with multiple times? I attached a video below when I interacted with it three times.

That and how would you prevent it from talking unless interacted with? It kinda caches the responses until interacted with. Regardless thank you so much for taking time out of your day to respond either or you’ve helped me :sob: