This is for a health billboard gui and i tweened it so that it changes but I want the textlabel to change also as the health and max health changes and I want it to show for everyone using remote events but it does not work any fix? Just by joining the game right away i've tried using game.players.PlayerAdded:Connect(function(plr) which did work but it did not change as that only happens once local script

local Player = game.Players.LocalPlayer
local ServerStorage = game:GetService("ServerStorage")
local BillBoard = script.Parent
local RemoteEvent = BillBoard:WaitForChild('HPEVENT')
local Red = BillBoard.REDNess
local Green = Red.GreenESS
local TextLabel = BillBoard.TextLabel
local Character = Player.Character
local Humanoid = Character.Humanoid

Humanoid.HealthChanged:Connect(function(HP)
    RemoteEvent:FireServer(HP)


end)

script

local ServerStorage = game:GetService("ServerStorage")
local BillBoard = script.Parent
local RemoteEvent = BillBoard:WaitForChild('HPEVENT')
local Red = BillBoard.REDNess
local Green = Red.GreenESS
local TextLabel = BillBoard.TextLabel
local Char = script.Parent.Parent.Parent
local Hum = Char:FindFirstChild('Humanoid')
local LabelText = script.Parent.TextLabel





RemoteEvent.OnServerEvent:Connect(function(player,HP)
     if HP then

            Red:TweenSize(UDim2.new(HP/Hum.MaxHealth,0,1,0))

            end




end)

6 comments

1

Didn't you already ask this?

0

^^he probably didnt get an answer that happens quite a lot on some scripts until someone that can figure it out finds it

0

script.Parent.Text = Humanoid.Health

0

LOL xD

0

whats wrong with that?

0

@Halmuni I don't see why the localscript is needed in the first place