Sign in to follow this  
red1500z

command to change stats for food crash server with caves

Recommended Posts

red1500z    0
hello I am using a code to change the statistics of an edible item but on a server when crafting the item it crashes

 

the code is this  =

 

 if GLOBAL.TheNet and GLOBAL.TheNet:GetIsServer() then
        AddPrefabPostInit("masamaligna", function(inst)
        if GetPlayer().prefab == "red1500" then
            inst:AddComponent("edible")
            inst.components.edible.foodtype = MONSTERMEAT
            inst.components.edible.healthvalue = 90
        end
        end)
        end

 

Does anyone know how it can be fixed? please

Share this post


Link to post
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
Sign in to follow this