Time Overhead GUI

Hey! I’m Tanvir, I’m asking you for help to me out with this time overhead
image
this is the script in serverscriptstorage

local BillboardGui = game.ServerStorage.BillboardGui

Players.PlayerAdded:Connect(function(Player)
	local timeAlive = Player.leaderstats['Time Alive']

	Player.CharacterAdded:Connect(function(Character)
		local BillboardClone = BillboardGui:Clone()
		BillboardClone.Parent = Character:WaitForChild("Head")
		BillboardClone.TextLabel.Text = timeAlive.Value

		timeAlive:GetPropertyChangedSignal('Value'):Connect(function()
			BillboardClone.TextLabel.Text = timeAlive.Value
		end)
	end)
end)

Im asking you to help me because when I join the time, username, health doesn’t work

1 Like

Have you tried inserting scripts within the username, health and other guis.

1 Like

I would try this, since it gives the leader stats time to load

local BillboardGui = game.ServerStorage.BillboardGui

Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		local timeAlive = Player.leaderstats:WaitForChild('Time Alive')
		local BillboardClone = BillboardGui:Clone()
		BillboardClone.Parent = Character:WaitForChild("Head")
		BillboardClone.TextLabel.Text = timeAlive.Value

		timeAlive:GetPropertyChangedSignal('Value'):Connect(function()
			BillboardClone.TextLabel.Text = timeAlive.Value
		end)
	end)
end)
1 Like

I want like the username/health and time to work

Have you started to make those yet?

what do you mean? have I started on the username/health and time overhead GUI? if you meant that then yeah

image

I just need help with the script that will show the health and your username and the time

this is the script in starter character scripts

local player = game.Players:GetPlayerFromCharacter(character)

local humanoid = character:WaitForChild('Humanoid')

local leaderstats = player.leaderstats
local timeAlive = leaderstats["Time Alive"]
local bestTime = leaderstats["Best Time"]

local regionPart = workspace.Region

local min = regionPart.Position - (0.5 * regionPart.Size)
local max = regionPart.Position + (0.5 * regionPart.Size)
local region = Region3.new(min, max)

local function CheckSpawnRegion()
	local objects = workspace:FindPartsInRegion3WithWhiteList(region, {character})

	if #objects > 0 then
		if not character:FindFirstChildOfClass("ForceField") then
			local forceField = Instance.new("ForceField")
			forceField.Visible = true
			forceField.Parent = character
		end

		return true
	else
		local forceField = character:FindFirstChildOfClass("ForceField")

		if forceField then
			forceField:Destroy()
		end

		return false
	end
end

local hasDied = false

humanoid.Died:Connect(function()
	hasDied = true
end)

while wait() do
	if hasDied then break end

	while not hasDied and not CheckSpawnRegion() do
		timeAlive.Value += 1

		if timeAlive.Value > bestTime.Value then
			bestTime.Value = timeAlive.Value
		end

		wait(1)
	end

	if hasDied then
		timeAlive.Value = 0
	end
end