Lapzzo Posted September 8, 2021 Share Posted September 8, 2021 I made this zapper skript, it works, but i want it so you cant strike players or villagers. heres what i have now on rightclick: if player's tool is blaze rod named "&6Zapper": strike lightning at the targeted entity else: if player's tool is blaze rod named "&6Zapper": if entity is a villager: cancel event send "&cYou cant strike this entity" to player else: if player's tool is blaze rod named "&6Zapper": if entity is player: cancel event send "&cYou cant strike this entity" to It doesnt work no errors Link to comment Share on other sites More sharing options...
FlapKakker Posted September 8, 2021 Share Posted September 8, 2021 You use an if statement to check if the player has a named blaze rod in his hand. The else condition should trigger when the player DOES NOT hold a blaze rod named zapper currently, yet u again check if the player's tool is a named blaze rod. Therefore, the else statement, will trigger if he isnt holding a named blaze rod and end immediately. This can be confusing, and if you want i can discuss it further in personal messages! 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