abouhanafy87 5 Posted January 17, 2023 hi everyone i try to get NPC that interacting me and the results is null target = NPCs.closest(npc-> npc.isInteractedWith() && Players.getLocal().getCharacterInteractingWithMe().getModel().equals(npc.getModel())); it's null
holic 237 Posted January 18, 2023 Do a null check for Players.getLocal().getCharacterInteractingWithMe() and there's no need to compare models, you can just do Players.getLocal().getCharacterInteractingWithMe().equals(npc); also, someone else correct me if I'm wrong, I think you could be using getInteractingCharacter instead of getCharacterInteractingWithMe based on the isInteractedWith call
Recommended Posts
Archived
This topic is now archived and is closed to further replies.