How to create Clickable Server NPCs – Tutorial Series #019

Commands:
Step 1: Make Piglin NPC
/tag @e[type=piglin,c=1] add cnpc

Step 2: Make Horse NPC
/tag @e[type=horse,c=1] add cnpc

Step 3: Horse Invisibility
/effect @e[tag=cnpc, type=horse] invisibility 5 1 true

Step 4: Freeze NPCs
/execute @e[tag=cnpc] ~ ~ ~ tp @s 91 5 -31 facing @p

Step 5: Invulnerable NPCs
/effect @e[tag=cnpc] resistance 5 225 true

Step 6: Teleportation Tag
/tag @a[x=~,y=~,z=~,dx=1,dy=10,dz=1] add tp

Step 7: Teleport Player
1) /tellraw @a[tag=tp] {"rawtext":[{"text":"§aSuccessfully teleported to §e§lHub!"}]}
2) /playsound random.levelup @a[tag=tp]
3) /tp @a[tag=tp] 67 5 16
4) /tag @a[tag=tp] remove tp

Write your comment Here