"Value cannot be assigned to "

Trying to duplicate a part based on multiple int value inside of multiplier brick.
Not much to say so here is the script, error, and context

image

local Part = script.Parent
local textt = Part:WaitForChild("SurfaceGui").TextLabel
local multiplier = Part.Multiple.Value
local id = Part.ID

textt.Text = "x" .. multiplier

Part.Touched:Connect(function(hit)
	if hit.Name == "Origin" or hit.Name == "Ball" then
		print(hit:FindFirstChild("Touched").Value)
		if hit:FindFirstChild("Touched").Value ~= id.Value then
			print("val")
			hit.Touched.Value = 1
			for i = 1, multiplier do
				local hc = hit:Clone()
				hc.Touched.Value = id.Value
				hc.Name = "Ball"
				hc.Parent = game.Workspace
			end
		end
	end
end)

image

(Ignore the prints in the script they were for debugging)

You made touched an int value right?

Yea its an Int value inside of the Origin ball

Try changing

hit.Touched.Value = 1

To

hit:FindFirstChild("Touched").Value = 1

In my testing roblox will prefer the EVENT “Touched” over any instance named “Touched” in the part

Its a really stupid error name and should prob be bug reported to roblox to fix it but it is what it is

Oh my god I just realized its an Event name aswell, thank you :sob:

make sure to mark @PapaBreadd answer as a solution