I am currently working on a game and I currently have it so a health bar appears for their player but i cant get it to animate everyones health on everyones screen or show your teammates health any help is appreciated and here is a screenshot of the code and a video of how it works currently
#Help animating health bars and teammate health bars
1 messages · Page 1 of 1 (latest)
WaitForChild for client ??
About Noob, Guest, Bacon and Acorn why you don’t put it all in a table
preferable you put the function higher
use task.wait instead wait
the loop while true do never stops??
health text don’t update constantly
oh sorry im still relatively new to coding I don't know a lot of tricks
so what should I use instead of wait for child?
Use WaitForChild() for client, it takes time to replicate things to the client from the server
idk what bros on
never code again
Do you know how I can fix this problem here?
Fix what problem?
oh ur post
cause syn answered it
Who answered it?
Why do you have two equals? Like this = this, = to this
that will confuse lua
oh i changed it to a table so now its this
local Characters = {
Noob = playermodel.Name == "Noob",
Guest = playermodel.Name == "Guest",
Bacon = playermodel.Name == "Bacon",
Acorn = playermodel.Name == "Acorn"
}
Im pretty sure this way would be better
would this work to find other people like teammates?
local OtherPlayers = game:GetService("Players"):GetPlayers() and not player
uhm hey i have a question when I changed some code on here it gave me this when I tested
Heres the new code if that helps
PlayerAdded and PlayerStatusChanged is not a function
Make a function, and whenever the client events are triggered it will call that function. I also recommend having a different name for the function thats not the remote event
okay that fixed that problem I do have another question how can I have the client look for everyone on a team but local player if possible?
loop through every player in the team on the client
local script in player scripts