kipper0k Posted August 19, 2022 Share Posted August 19, 2022 I tried to do it with this code, but nothing worked for me AddPlayerPostInit(function(inst) local _OnSave, _OnLoad = inst.OnSave, inst.OnPreLoad inst.OnSave = function(inst, data, ...) data.armor_test = inst.armor_test return _OnSave(inst, data, ...) end inst.OnLoad = function(inst, data, ...) inst.armor_test = data.armor_test return _OnLoad(inst Link to comment https://forums.kleientertainment.com/forums/topic/142713-how-to-change-the-onload-and-onsave-functions-for-all-players/ Share on other sites More sharing options...
Bumber64 Posted August 20, 2022 Share Posted August 20, 2022 Might be too late for OnLoad during post init? Link to comment https://forums.kleientertainment.com/forums/topic/142713-how-to-change-the-onload-and-onsave-functions-for-all-players/#findComment-1595074 Share on other sites More sharing options...
kipper0k Posted August 20, 2022 Author Share Posted August 20, 2022 tell me how can i do it earlier? Link to comment https://forums.kleientertainment.com/forums/topic/142713-how-to-change-the-onload-and-onsave-functions-for-all-players/#findComment-1595126 Share on other sites More sharing options...
Bumber64 Posted August 22, 2022 Share Posted August 22, 2022 Assuming that's the actual issue, you might want to do stuff through a component instead. Link to comment https://forums.kleientertainment.com/forums/topic/142713-how-to-change-the-onload-and-onsave-functions-for-all-players/#findComment-1595377 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now