I created a Tabletop Simulator object with the following script:
function onLoad()
for _, player in ipairs(Player.getPlayers()) do
if player.promoted == false and player.admin == false then
player.promote()
end
end
end
function onPlayerConnect(player)
player.promote()
end
This seems to work fine when the object is spawned in (onLoad
), and when new players connect to my session (onPlayerConnect
). However, after a server host migration (“Give Host”), the players who join the new host are first promoted by the onPlayerConnect
event but then they get demoted again immediately after. There is no Lua code doing the demotion.
Is there a good solution to this that will keep all players promoted after a server host migration?