- 1
- 53
Ryan Codes
เข้าร่วมเมื่อ 4 ก.ย. 2022
Hello And Welcome to Ryan Codes! Here, you'll find fun Roblox gameplay, creative videos, and helpful Roblox Studio tutorials. Whether you're a player looking for entertainment or a developer seeking tips, this channel has something for you. Subscribe and join me on this exciting journey through the world of Roblox!
How to make a Health Bar Gui For Beginners | Roblox Studio
In this video, we'll create a custom health bar that updates as the player's health changes. The health bar is displayed using a frame, and the size of a sub-frame adjusts based on the player's health percentage. We also disable the default Roblox health bar to ensure only your custom UI is visible.
Health Bar Script | Local Script
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local Your Parent Frame here = script.Parent
local Your Sub frame here = Your parent frame here :WaitForChild("Your Sub Frame Here")
local function updateHealth()
local healthPercent = humanoid.Health / humanoid.MaxHealth
Your sub frame here.Size = UDim2.new(healthPercent, 0, 1, 0)
end
humanoid.HealthChanged:Connect(updateHealth)
updateHealth()
Disable Roblox Health Gui | Local Script
local StarterGui = game:GetService("StarterGui")
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, false)
#roblox #robloxgames #robloxstudio #robloxtrend
Health Bar Script | Local Script
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local Your Parent Frame here = script.Parent
local Your Sub frame here = Your parent frame here :WaitForChild("Your Sub Frame Here")
local function updateHealth()
local healthPercent = humanoid.Health / humanoid.MaxHealth
Your sub frame here.Size = UDim2.new(healthPercent, 0, 1, 0)
end
humanoid.HealthChanged:Connect(updateHealth)
updateHealth()
Disable Roblox Health Gui | Local Script
local StarterGui = game:GetService("StarterGui")
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, false)
#roblox #robloxgames #robloxstudio #robloxtrend
มุมมอง: 53
tysm it worked
Scripts In The Description😁