Maris Posted August 6, 2015 Share Posted August 6, 2015 AddPrefabPostInit("wilson",function(inst) print(tostring(GLOBAL.ThePlayer))end)Prints nil. Is is normal? Link to comment https://forums.kleientertainment.com/forums/topic/56836-theplayer/ Share on other sites More sharing options...
ZupaleX Posted August 6, 2015 Share Posted August 6, 2015 As far as I know, in modmain.lua, ThePlayer doesn't exist yet, it is loaded before you "arrive" in the world Link to comment https://forums.kleientertainment.com/forums/topic/56836-theplayer/#findComment-660650 Share on other sites More sharing options...
DarkXero Posted August 7, 2015 Share Posted August 7, 2015 The player is activated after the prefab is generated.AddPrefabPostInit("wilson",function(inst) inst:DoTaskInTime(0, function() print(tostring(GLOBAL.ThePlayer)) end)end) Link to comment https://forums.kleientertainment.com/forums/topic/56836-theplayer/#findComment-660736 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