How to make simple and smooth project tiles without using Roblox physics

Today I am trying to make simple and smooth project tiles, which will not use Roblox physics and not be affecting the game performance at all.

image

Basically what I want to do is make a tower that will shoot a rocket (MeshPart) at a the first enemy that it encounter’s. I do have all the logic for the tower, the only mechanism that is missing is actually launching a rocket. Now keep in mind that the targets (enemies) continuously move, so I want the rocket to update the target position as it goes, and include the fact that the projectile must face it’s target. Also adding onto that, those projectiles will move really fast but not too fast so the player can actually notice one.


So the real question is how do I make a project tile that I described without heavily impacting the performance? (of course it will run on LocalScript). Also please note that I already tried to do that multiple times but then performance was heavily impacted due to the calculations getting executed really fast.

have you tried using TweenService | Roblox Creator Documentation?

Yup, I did. Maybe not in the right way and that’s why it was causing performance issues. I might attempt again to write brand new code using it.


My previous piece code was the following:

local tweenBullet = TweenService:Create(bullet, TweenInfo.new((handle.Aim.WorldPosition - target.PrimaryPart.Position).Magnitude * 0.3 / 25, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {WorldPosition = raycastResult.Position})

But it was for bullets.

1 Like

how much are you firing or are you looping very fast?

Well there could be 30 towers with reload time of 0.05 firing at once, which is very fast. I am attempting to use different method for tracing the shots without involving looped calculations (like TweenService).