Dance (Effect) — Skript

Addon: Skript · Category: Effect · Since: 2.11

Syntax

make %livingentities% (start dancing|dance) [%-direction% %-location%] [for %-timespan%]

Description

Make an allay or piglin start or stop dancing. Providing a location only applies to allays. They will check to see if the the block at the location is a jukebox and playing music. If it isn't, they will stop dancing. If no location is provided, the allay will dance indefinitely. Providing a timespan only applies for piglins. It determines the length of time they will dance for. If no timespan is provided, they will dance indefinitely.

Examples

if last spawned allay is not dancing:
	make last spawned allay start dancing
if block at location(0, 0, 0) is a jukebox:
	make all allays dance at location(0, 0, 0)
make last spawned piglin start dancing
make all piglins dance for 5 hours

View source