I have been messing around with scripts that heal and damage a players health. But, it seems when I do this the default overhead Roblox healthbar doesn’t seem to change when the player gets healed or damaged. I don’t know if its my scripts or not, but can I get some help with fixing this?
Video:
Damage Script:
local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")
wait(5)
while true do
wait(1.25)
humanoid:TakeDamage(4.9)
end
Heal Script:
local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")
local clickdetector = game.Workspace.HealButton.ClickDetector
clickdetector.MouseClick:Connect(function()
humanoid.Health = 100
wait(5)
end)
Don’t use local scripts for damaging players, your script will be prone to exploiters. If the damage script is local, I don’t even understand how the damage is being replicated on the other client.
Well what hes doing is looping on a local script taking damage away for all players > so everyones seeing the same thing on their screen, but its just not showing for the other people is what that is.