Jump to content

Recommended Posts

So, I'm having a problem trying to make my character have a negative sanity aura around a modded prefab that has a sanity aura. My code is like this:
 

AddPrefabPostInit("tobi", function(inst)
        if GetPlayer().prefab == "ethan" then
            inst:AddComponent("sanityaura")
            inst.components.sanityaura.aura = -TUNING.SANITYAURA_LARGE
        end
    end)

This was placed in modmain.lua. And I got this error:
image.thumb.png.9cf6bd4084e1ce8e15f7f997f20d76e0.png

Any ideas?

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
×
  • Create New...