I’m making a game where enemies spawned have visible healthbars. For some reason, these healthbars stopped showing up on the client but switching to the server shows them working completely fine. I have the adornee set and all and it was working earlier. I added some new UI to the game but I’m not sure why that would change anything.
Change it a lil bit make the gui like in the replicated storage and then when the npc is created copy the gui and parent it to the npc if u asking about the scripts try to:
Put the gui in the replicated storage turn off the scripts
2.when the npc is spawned add the gui and turn the script after adding it
Fire a RemoteEvent to each client and have them create the GUI locally in a LocalScript this i am pretty sure will work the script of the gui add it to the clien side like
local gui = — path to the gui in replicated storage
local reEvent = — path remote event that inside the replicated storage
reEvent.OnClientEvent:Connect(function(NpcModel)
local newGui = gui:Clone()
newGui.Parent = theNpcHead or u can adrone
local npcHumanoid = NpcModel.Humanoid
— add the gui functionality here like the code that u sent for the gui
end)
And in the server side fire the remote ecent to all clients and put the Npc as first parameter
Woops, guess it had to do with setting the camera mode to Fixed. When I changed it to something else like Scriptable, the health bars showed up again. Really weird too because when I cloned NEW noobs on the client THEY had visible health bars for some reason.