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

Players.test.PlayerGui.display:6: attempt to index nil with 'FindFirstChild'?

Asked by 1 year ago

wait(3/2)

local player = game.Players.LocalPlayer local character = player.Character local stats = player:FindFirstChild('leaderstats') local cash = stats:FindFirstChild('Cash')

local billboardgui = Instance.new('BillboardGui', character) billboardgui.Size = UDim2.new(1, 0, 1, 0) billboardgui.Adornee = character.Head billboardgui.StudsOffset = Vector3.new(0, 2.75, 0) print 'made billboardgui' wait(1/2) local frame = Instance.new('Frame', billboardgui) frame.Size = UDim2.new(1, 0, 1, 0) frame.BackgroundTransparency = 1 frame.BackgroundColor3 = Color3.new(255, 255, 255) print 'made frame' wait(1/2) local textlabel = Instance.new('TextLabel', frame) textlabel.Size = UDim2.new(0.5, 0, 0.5, 0) textlabel.Position = UDim2.new(0.25, 0, 0.25, 0) textlabel.FontSize = 'Size24' textlabel.Font = 'SourceSans' textlabel.BackgroundTransparency = 1 textlabel.TextColor3 = Color3.new(255, 255, 255) textlabel.TextStrokeTransparency = 0 textlabel.TextStrokeColor3 = script.color.Value print 'basic label set up' while wait(1/2) do print 'displaying' textlabel.Text = '$ Funds : '..cash.Value end

0
Replace FindFirstChiild with WaitForChild T3_MasterGamer 2189 — 1y

Answer this question