Jump to content

Loop player not working


FegeFege123

Recommended Posts

I have a skript

every 1 tick:
	loop all players:
	if loop-players location is "29, 72, -17":
		if loop-players world is "parkour":
			broadcast "work"

but it gives me an error

There's no loop that matches 'loop-players location' (parkour.sk, line 153: if loop-players location is "29, 72, -17":')

can someone help me fix it?

Link to comment
Share on other sites

at first: every 1 tick is very buggy, will cause lots of lag for your server.
second: Im not sure you want to use the broadcast expression here, more like message "work" to loop-player.
Because right now it will spam every single person in the server (not mattering which world) 1  × how many players are in that world per tick

You have to specify a world to check the location of, e.g. every 1 tick in world "world" or loop all players in world "world".

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...