07-04-2016, 03:49 AM
I'm going to make a few suggestions based on what I see here..
A) There's several very "expensive" things happening in an non-throttled Draw loop, which is not great. The Draw loop happens on every frame, and a lot of your logic (and pretty much all logic in general) really shouldn't be there. NavigationManager:GetClosestPointOnMesh and Player:MoveTo especially. These should be moved to an OnUpdate with some minimum throttle amount.
B) The global variables should be pushed into the PartyFollowAssist table (ex: PartyFollowAssist.Enable instead of Enable) or given more proper names to distinguish them, because they will pollute the global space, and could accidentally be overridden.
+1 for taking initiative though, good job.
A) There's several very "expensive" things happening in an non-throttled Draw loop, which is not great. The Draw loop happens on every frame, and a lot of your logic (and pretty much all logic in general) really shouldn't be there. NavigationManager:GetClosestPointOnMesh and Player:MoveTo especially. These should be moved to an OnUpdate with some minimum throttle amount.
B) The global variables should be pushed into the PartyFollowAssist table (ex: PartyFollowAssist.Enable instead of Enable) or given more proper names to distinguish them, because they will pollute the global space, and could accidentally be overridden.
+1 for taking initiative though, good job.