Jump to content

Question


Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...