Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to Detect if Table Values are Touched?

If I had a table such as:

local TableExample= {game.Workspace.DummyA.Torso, game.Workspace.DummyB.Torso}

Could it be possible to make it so the script can detect if the torsos in the table are touched?

1 comment

0

Yes

1 answer

✓ Accepted answer
for _,v in pairs(TableExample) do
	v.Touched:Connect(function(hit)
		print(v.Parent.Name .. "'s Torso was touched by " .. hit.Name)
	end)
end

This discussion is preserved as it was. New answers, comments, and votes are closed.