How to play an animation via lua

Hey All so ive been stuck with this problem for a while now and ive officially pulled out my last hair. What im trying to do is when i press a ent that ent will tell another ent to play an animation sequence for example pressing a button will make a thing play its spinning animation. i saw somewhere youre meant to use the set:sequence function but it wont work any suggestions guys?

setsequenceandwait is one way, you’d have to use netmsg if you want to make an entity tell another entity to animate.

NextBot:PlaySequenceAndWait is a nextbot function.

You could try

Entity:ResetSequence

I have very basic lua skills would one of you be able to write my an example script just basic so i have a jumping off point

Bump

[lua]
OnUse
Find the other Entity
OtherEntity:ResetSequence or some such
Finish
[/lua]

Much more is basically just being spoonfed