• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ player:teleportTo(toPosition, true) does not work properly...

Svira

Banned User
Joined
Jan 27, 2008
Messages
361
Solutions
13
Reaction score
106
Hello everyone,

Recently, I've been struggling with the following issue: the function
LUA:
player:teleportTo(toPosition, true)
isn't working properly, especially with level doors. Instead of teleporting behind the door, it sends us back to the square (SQM) we are trying to pass from. If we don't meet the level requirement, we correctly get the message "Only the worthy may pass."

Where should I be looking for the problem? It seems to be related to scripts that use player:teleportTo(toPosition, true).

One solution (which seems odd but works, though too many files need editing) is to change the order from:

LUA:
item:transform(itemId + 1)
player:teleportTo(toPosition, true)
to:
LUA:
player:teleportTo(toPosition, true)
item:transform(itemId + 1)
Is there any way to fix this issue without having to worry about the order of these actions?
 
Back
Top