Oh, I can’t have Discord yet. Just, try and make a ServerScript that handles the Race stuff, then handle the damage there.
For the local Tag
replace the =
to ```character:WaitForChild(“Tag”):FindFirstChild(“Tag”)
Please set my Reply as the solution, if it worked. I cannot help you with the Health Reduction script, as I cannot have permissions to the game. The only part you asked for, was how to fix the billboard, and I’ve done my part. Now you shall do yours.
Not yet sadly, I’m still getting the attempt to index nil with head.
I can’t believe this is causing so many problems.
Here is located and is a localscript.
game:GetService("RunService").RenderStepped:Connect(function()
for index, player in pairs(game.Players:GetPlayers()) do
local character = player.Character
local Tag = character:WaitForChild("Head"):FindFirstChild("Tag")
if Tag then
local HealthBackground = Tag.HealthBarBackground
local HealthBar = HealthBackground.HealthBar
local Humanoid = character.Humanoid
HealthBar.Size = Udim2.new(Humanoid.Health / Humanoid.MaxHealth, 0, 1, 0)
end
end
end)
Try this!
game:GetService("RunService").RenderStepped:Connect(function()
for index, player in pairs(game.Players:GetPlayers()) do
local character = player.Character or player.CharacterAdded:Wait()
local Tag = character:WaitForChild("Head"):FindFirstChild("Tag")
if Tag then
local HealthBackground = Tag.HealthBarBackground
local HealthBar = HealthBackground.HealthBar
local Humanoid = character.Humanoid
HealthBar.Size = Udim2.new(Humanoid.Health / Humanoid.MaxHealth, 0, 1, 0)
end
end
end)
Now it works, I’m going to check the dmg right now.
Make sure the dmg is dealt on the Server side, or else the HealthBars won’t update.
I’m gonna take a break from coding, I might not reply, just letting you know!
Thanks it worked, The bar goes down when getting damaged, I still have an issue but is not fault of the healthbar, is fault of another script that is local that I’m trying to make a client side.
Happy to help! If you need any help, just ask me.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.