Run it
Copy the script and paste it into your executor.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Events = ReplicatedStorage:FindFirstChild("Events")
local RemoteEvents = Events:FindFirstChild("RemoteEvents")
local AddHPBars = RemoteEvents:FindFirstChild("AddHPBars")
local Workspace = game:GetService("Workspace")
local CollectionService = game:GetService()
NPCFolders = Workspace:()
FriendlyFolder = NPCFolders:()
EnemyFolder = NPCFolders:()
ProcessedNPCs = {}
(npc, defaultBarType)
CollectionService:(npc, )
CollectionService:(npc, )
defaultBarType
(npc, defaultBarType)
npc ProcessedNPCs[npc]
ProcessedNPCs[npc] =
.(()
head = npc:(, )
humanoid = npc:(, )
head humanoid
barType = (npc, defaultBarType)
(()
(AddHPBars.OnClientEvent, npc, barType, head)
)
ProcessedNPCs[npc] =
)
FriendlyFolder
.(()
children = FriendlyFolder:()
_, npc (children)
(npc, )
.()
)
FriendlyFolder.ChildAdded:((npc)
(npc, )
)
EnemyFolder
.(()
children = EnemyFolder:()
_, npc (children)
(npc, )
.()
)
EnemyFolder.ChildAdded:((npc)
(npc, )
)
Self explanatory, shows the healthbar A question you will probably ask Why did you make a healthbar script if you already made one? Simple, it sucked, and this one shows the ACTUAL healthbar from the battle bricks.
The Battle Bricks