#how do i made it check if there is a targeted entity?
1 messages · Page 1 of 1 (latest)
if player's held item is {venusgun}:
set {_waited} to difference between {gunshot.%player%.lastused} and now
if {_waited} is less than 2 seconds:
send "&l&cHey yo, &7chill bro who you tryna explode☠ chill for &a%difference between 2 seconds and {_waited}% &7to shoot bro☠" to player
play sound "entity.villager.no"
stop
else:
set {gunshot.%player%.lastused} to now
set {_V} to vector from player to target entity
set vector length of {_V} to 0.2
set {_loc} to location of player's eyes
loop (distance between {_loc} and target entity) / 0.2 times:
draw 1 of dust_color_transition using dustTransition(blue, cyan, 1) at {_loc} with force
set {_loc} to {_loc} ~ {_v}
set {d} to 10
remove {d} from target entity's health
push target entity upwards with speed 0.03
push target entity backwards with speed 0.05
set {_p} to player's target entity
set {d} to 5
remove {d} from target entity's health
loop 5 times:
show 3 firework's spark with offset of 0, 0, 0 speed 0.3 at {_p}
```
like
if player's target entity is air
idk
like how to check if there is even a target entity?
Ah yes, air as entity
If player's targeted entity is...
Or if player's targeted block is
i did like an example
like if theres there is no entity
So u want to check if players target isnt set?
Then just dont add thr line at all
target entity is set but dont do cooldowns like that