Lua is case sensitive, its just erroring because your wrote WaitforChild instead of WaitForChild. :)
01 | local Player = game:GetService( "Players" ).LocalPlayer |
02 | local Character = Player.Character or Player.CharacterAdded:wait() |
03 | local Humanoid = Character:WaitForChild( "Humanoid" ) |
05 | local PlrStats = Player:WaitForChild( "PlrStats" ) |
07 | local Stamina = PlrStats:WaitForChild( "Stamina" ) |
08 | local MaxStamina = PlrStats:WaitForChild( "MaxStamina" ) |
09 | local Level = PlrStats:WaitForChild( "Level" ) |
10 | local Exp = PlrStats:WaitForChild( "EXP" ) |
12 | local PlrInfo = script.Parent |
13 | local HealthBar = PlrInfo.HealthBar |
14 | local StaminaBar = PlrInfo.StaminaBar |
16 | local HP_Display = PlrInfo:WaitForChild( "HealthDisplay" ) |
17 | local STM_Display = PlrInfo:WaitForChild( "StaminaDisplay" ) |
18 | local Lvl_Display = PlrInfo:WaitForChild( "LvlDisplay" ) |
19 | local Exp_Display = PlrInfo:WaitForChild( "ExpDisplay" ) |
21 | local runService = game:GetService( "RunService" ) |
23 | runService.Heartbeat:Connect( function () |
24 | HP_Display.Text = "HP:" ..math.floor(Humanoid.Health).. "/" ..Humanoid.MaxHealth |
25 | STM_Display.Text = "Stamina:" ..Stamina.Value.. "/" ..MaxStamina.Value |
26 | Lvl_Display.Text = "Lvl:" ..Level.Value |
28 | HealthBar.Size = UDim 2. new((Humanoid.Health/Humanoid.MaxHealth)* 0.893 , 0 ,. 0071 , 0 ) |
29 | StaminaBar.Size = UDim 2. new((Stamina.Value/MaxStamina.Value)* 0.895 , 0 ,. 0071 , 0 ) |