Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

CollectionService is not using everyone properly?

Asked by 2 years ago

Im making a game where the npcs stare at you and I am trying to use CollectionService to make all the npcs look at the player but only one is facing the player. This is the script:

01RunService = game:GetService("RunService")
02CollectionService = game:GetService("CollectionService")
03game.Players.PlayerAdded:Wait()
04 
05plr = game.Players:GetChildren()
06 
07for _, Player in plr do
08 
09    plr = Player
10    break
11 
12end
13 
14for _, NPCs in CollectionService:GetTagged("NPC Stare") do
15 
View all 33 lines...

Answer this question