Look At (Effect) — Skript

Addon: Skript · Category: Effect · Since: 2.7

Syntax

(force|make) %livingentities% [to] (face [towards]|look [(at|towards)]) %entity%'s (feet|eyes) [(at|with) [head] [rotation] speed %-number%] [[and] max[imum] [head] pitch %-number%]

Description

Forces the mob(s) or player(s) to look at an entity, vector or location. Vanilla max head pitches range from 10 to 50.

Examples

force the player to look towards event-entity's feet
on entity explosion:
	set {_player} to the nearest player
	{_player} is set
	distance between {_player} and the event-location is less than 15
	make {_player} look towards vector from the {_player} to location of the event-entity
force {_enderman} to face the block 3 meters above {_location} at head rotation speed 100.5 and max head pitch -40

View source