I'm new to skript so I'm trying some things, and I'm trying to make all pigs pathfind to the player, but every time I spawn a pig my server crashes
idk if this "CODE" thing will work I'm sorry
edit:
I got my code to work, but I want to make all pigs follow me but just the last spawned does
Code:
on spawn of pig:
while entity is alive:
loop players in radius 10 of the entity:
broadcast "%loop-player%"
make event-entity pathfind to location of loop-player with speed 1
exit loop
edit:
I got my code to work, but I want to make all pigs follow me but just the last spawned does
Code:
every 1 tick:
loop all pigs:
set {_pig} to loop-entity
loop all players:
set {_player} to loop-player
make {_pig} pathfind to location of {_player} with speed 1.3
Last edited: