Hi there. Im considered new to lua scripting, but i have basic programming knowledges. And, Im currently working on a payday 2 lua hack scripting, and i encountered some problems here. I hope to have solutions and suggestions as well as some guilds on doing so.
the code that works smoothly only IF YOU ARE HOST else u will get a game crash.
local start = function()
managers.network:session():spawn_players(true)
end
my idea, is, changing this function that only works if u're host, to works perfectly even if u're a client. so, i changed to like this.

local start = function()
if Network:is_client() then
managers.network:session():send_to_host( "spawn_players", true )
else
managers.network:session():spawn_players(true)
end
end
well, but it seems not able to work. and, i think that's the send_to_host line is wrong. I hope for some solutions Thank You