Jump to content

I need help with skript


Lapzzo

Recommended Posts

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

 

imgonline-com-ua-resize-CNNkL1drx5M-removebg-preview.png.d6a8ae8b5eb862005fb056c21f934200.png

Link to comment
Share on other sites

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

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
×
×
  • Create New...