Maris Posted March 21, 2020 Share Posted March 21, 2020 -- when you or a npc try to hit something xpUpdate.onWeaponHitXp = function(owner, weapon, hitObject, damage) local isShove = false if hitObject:isOnFloor() == false and weapon:getName() == "Bare Hands" then The function getName() returns translated name! It may be not English. So it should be: weapon:getType() == "BareHands" Link to comment Share on other sites More sharing options...
Nebula Posted March 21, 2020 Share Posted March 21, 2020 getDisplayName... Link to comment Share on other sites More sharing options...
Maris Posted March 23, 2020 Author Share Posted March 23, 2020 (edited) The result of getName() is equal to getDisplayName(). But getType() is better anyway in this code. Edited March 23, 2020 by Maris 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