game:GetService("Players").PlayerRemoving:connect(function(player)
print("Player " .. player.userId .. " leaving")
local isTeleportingOut = "False"
if player.Teleported then isTeleportingOut = "True" end
if assetGameUrl and access and placeId and player and player.userId then
game:HttpGet(assetGameUrl .. "/Game/ClientPresence.ashx?action=disconnect&PlaceID=" .. placeId .. "&UserID=" .. player.userId .. "&IsTeleport=" .. isTeleportingOut)
end
end)
Line 118 is this one:
if player.Teleported then isTeleportingOut = "True" end
The error is typically for accessing a member you should not be able to access.
The GameServer.ashx is able to access Player.Teleported though, so yeah… no idea what happened. (It is as if the new thread created by PlayerRemoving changed identity)