Hi, I'm relatively new to scripting.
I want to be able to move from a spot where I'm standing, to another position.
This code works, however i need it so i gradually move positions instead of instantly teleporting.
could any ones brilliant scripting knowledge tell me how i could do this please. Im sorry if this was a noob question
I've got this code in my gsc at the moment
savePos()
{
self endon("disconnect");
self notifyOnPlayerCommand("save", "save");
for ( ;; )
{
self waittill("save");
self.saved_origin = self.origin;
self.saved_angles = self.angles;
}
}
loadPos()
{
self endon("disconnect");
self notifyOnPlayerCommand("load", "load");
for ( ;; )
{
self waittill("load");
self freezecontrols(true);
wait 0.05;
self setPlayerAngles(self.saved_angles);
self setOrigin(self.saved_origin);
self freezecontrols(false);
}
}