Help with making a item scanner

I’m trying to make a checkout register for a supermarket and for that once someone scans an item, a value will be off so it doesn’t start beeping when the user leaves the building, when I touch the part with the tool nothing happens, the code is below.

script.Parent.Touched:Connect(function(item)
	if item.Parent:IsA("Tool") then
		item.EAS_Active.Value = false
		script.Parent.Color = Color3.new(0.333333, 1, 0)
		wait(.2)
		script.Parent.Color = Color3.new(1, 0, 0)
	end
end)

Please help me!

Try printing something, and also use task.wait. I dont see why it wouldn’t work

I think you are setting the EAS for the Tool’s part, not the actual object that got touched.

There’s a BoolValue parented to the Tool.

Did you check the output? Any errors that occur? Does the Tool have the Bool value or the part that touched it?

It didn’t have any errors before but now it does. After I’ve added wait and print.