Hi. So, I've only had this issue recently, where an NPC stays still after moving to a position, the script seemingly halting and refusing to proceed or even print the debug phrase despite the NPC clearly at the position it was told to move to. This was not an issue during early development of the game, but somehow is now.
local Step1 = game.Workspace.bricc1.Position Humanoid:MoveTo(Step1) Humanoid.MoveToFinished:Wait(.1) print("oh lawd he shooting!!!") Humanoid.Parent.Shoot.Disabled = false --Toggles the Shooting Animation Sounds.Laugh:Play() wait(3) Humanoid.Jump = true wait(1) Humanoid.Parent.Shoot.Disabled = false wait(3)
Is there a way I can optimize this, or is there lag I must get rid of within to server to fix the problem? This is also only a snippet of the entire script, the second instance using MoveTo (which occurs later in the script) has already been chained to a function. I have tried optimizing many bad scripts already elsewhere, but this issue still persists. If it would help and you need me to post the entire script, let me know so that I may edit it accordingly.