Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Overhead leaderstats GUI not showing?

Asked by 4 years ago
Edited 4 years ago

I am new to scripting in roblox and i seem to be confused with making GUIs

The Overhead GUI is not showing, this is my code;

local player = game.Players.LocalPlayer local statgui = player.PlayerGui:WaitForChild("TimeGUI") local frame = statgui:WaitForChild("Frame") local timeframe = frame:WaitForChild("TimeFrame") local time = timeframe:WaitForChild("Label") local leaderstats = player:WaitForChild("leaderstats") local timeval = leaderstats:WaitForChild("Timer") function updateStatsToGUI() Timer.Text = (" " ..timeval.Value.. " Time alive") end timeval.Changed:connect(updateStatsToGUI)

More Info: https://gyazo.com/b5a460e6aa1096bffde5144976fa50a2?token=775f391d0c8cfbadefd82f7bae895331

0
Quick note, WaitForChild can be very annoying to deal with (in my opinion), so if the local script is parented to timeval, you know the parents had to come before the child and should exist. beeswithstingerss 41 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

I can't find anywhere where you define Timer (Timer.Text = ....). This may be a typo, but I do believe this is the issue.

Ad

Answer this question