It's hard to debug for us when your code is not tidy.
But you don't end your ghost function's while loop with a wait(1);


Click and join the 3dgs irc community!
Room: #3dgs