I'm trying to a make a custom health gui, and I get this error. Help? (I already tried game.Players.LocalPlayer.Character.Humanoid.Health, same error.)
Use both scripts if needed:
--LOCAL SCRIPT--
local RS = game:GetService("ReplicatedStorage")
local remotef = RS.RemoteFunctions:WaitForChild("Change3")
while true do
wait(.0001)
local MV = remotef:InvokeServer(workspace:FindFirstChild(script.Parent.Parent.Parent.Parent.Parent.Parent.Name):WaitForChild("Humanoid").Health) -- The problem/error
script.Parent.Text = "[H] HEALTH: "..MV
end
--SERVER SCRIPT--
function cV (player,healthAmount)
while true do
wait(.0001)
return healthAmount.Value
end
end
game.ReplicatedStorage:WaitForChild("RemoteFunctions").Change3.OnServerInvoke = cV

1 comment
You can concatenate numbers in lua, try "print('hey' .. 5)" in the command line.