IanSchot Posted July 18, 2018 Share Posted July 18, 2018 So i've been trying to figure out how i can get a OnCreate:(This case "recipe_DoStuff") to successfuly check and fire a output if a trait is met. I'm not too sure what i'm doing wrong here. function recipe_DoStuff(items, result, player) --other stuff if player:hasTrait("WeakStomach") == true then player:Say("I Pooped my pants."); --this would be my generic output. end --other stuff end This file is in media/lua/server, if that makes a difference. Link to comment Share on other sites More sharing options...
nater Posted July 18, 2018 Share Posted July 18, 2018 You will want to move this file to media/lua/client rather than media/lua/server/. You'll also want to verify your recipe in your txt file has the OnCreate: line calling this function. 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