everytick = lightbeam.setangle-to:flashlight.angle that should solve it
or you can use the pin behavior on light and pin it position&angle and will automatically follow the flashalight angle and position.
here is a capx example v2 using pin
i updated the toggle of the lightbeam now when you press the flashlight from button to the tail area it toggles the opacity of the lightbeam sprite.
Thanks but I wanted to achieve something a bit different. As for now you have a flashlight and light beam, what I wanted is to use the same lightbeam on other copies of flashlight, like for example, If i copy the flashlight, set it to rotate by a bit different curve but use the same lightbeam on it. Such as, it moves differently, but light the same.
And if you want to copy the flashlight and have the new one also have its own beam, use containers <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy"> https://www.scirra.com/manual/150/containers
According to the manual this approach creates same object, but I can't manipulate each one of the created objects separately. I would like to animate the flashlight, or change its position independently of all other flashlights.