How would i make objects move randomly in a set space

Hi so for my game i am trying to create an energy core of some kind and for it i wanna have a view into some small particles moving around sparactily kinda like this. Without all the effects of course.

I’ve tried making a script to do this but they just end up going outside of the given area. How can limit them to a jump around only in a specific area. I don’t know too much about scripting moving parts so if anyone could help me with this that be cool.

Sorry if this post is a mess i just dont know how to describe it that well.

1 Like

are you trying to move parts? or particles?

if your trying to move particles, then they have certain properties that you can edit to make them move like that. (no scripting required)

BUT if your wanting to move parts then that’s a bit different, i’ll provide code if that’s your goal.

Yeah I am trying to move parts since I have a lot more flexibility with parts when it comes to textures, meshes and other stuff.