. . . Posted May 9, 2019 Share Posted May 9, 2019 Is using in modmain.lua if GLOBAL.TheNet:GetIsServer() then end equivalent to if not GLOBAL.TheWorld.ismastersim then return inst end So would both of these functions work the same? Spoiler local function Selfstacker(inst) if not G.TheWorld.ismastersim then return inst end inst:AddComponent("selfstacker") end AddPrefabPostInit("spidergland", Selfstacker) AddPrefabPostInit("stinger", Selfstacker) if GLOBAL.TheNet:GetIsServer() then local function Selfstacker(inst) inst:AddComponent("selfstacker") end AddPrefabPostInit("spidergland", Selfstacker) AddPrefabPostInit("stinger", Selfstacker) end Link to comment Share on other sites More sharing options...
Ultroman Posted May 9, 2019 Share Posted May 9, 2019 (edited) According to this post, TheWorld.ismastersim == TheNet:GetIsServer() (if I'm reading it right). Edited May 9, 2019 by Ultroman Link to comment 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