Is there an object value for the objects a Sprite is touching?

I am making a game where the number of variations of units is so great that I have to use clones called with an event that runs certain scripts with certain variables in those clones.. etc. How would I make a script that fires when touched (attacking) and has a script-only "hit" variable to send a script to just that clone?
In Roblox Lua (another project of mine) you can detect what an object hit like this:
script.parent.touched:Connect(attack)
Function attack(hit)
hit:DealDamage(20)
end
FYI, I know about this "tell" block, I wonder about just the touch scripts.
image
Thank you!
(Also, if you know of any custom extended sensing libraries, remote event-esque blocks, or extended clone function libraries, please tell me :)) (End parenthesis or smiley's double chin?...)
(I'm new, and I think I'm supposed to introduce myself, so: I came here from Scratch after frustrating about its limits and needing to make a game that required all sorts of things Scratch doesn't have, so I found Snap and was promptly hospitalized from mental overload. I no-joke had a dream about Snap last night.)

Welcome to Snap!
You can query the neighbors of your sprite and filter it by those it is touching:

Is this what you're looking for?

Yes! I've seen that script before when looking up solutions, but didn't know that it was a filter! Thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.