of     1   

complexo
#228244947Thursday, November 30, 2017 1:11 AM GMT

I'm making a framework where every modulescript represents a type of entity, providin a way to create that entity. The entity is a table, with properties including a projectile. I'm going by guesswork, so I should ask whether my method is sensible or not. Modulescript: local Entity = {} function Entity:new() Entity.Projectile = script.Rocket:Clone() return self, Entity.EventStream end function Entity:main(arguments) Entity.Projectile.Velocity = arguments.projectileCFrame.lookVector*100 end return Entity Entity manager: local Entity = require(EntityScript):new() Entity:main(arguments)
complexo
#228245741Thursday, November 30, 2017 1:36 AM GMT

By the way, this works, but I don't know why. However I don't think it's entirely holeproof. For example, if I fire any number of rockets sequentially, the last one will fall much faster than the others.

    of     1