Hello everyone!
So I’ve been trying to make a leaderstats icon with TopbarPlus on the basis of what I’ve seen in the uncopylocked place, but I’m getting an error every time.
The error:
The script:
local localPlayer = game:GetService("Players").LocalPlayer
local playerGui = localPlayer.PlayerGui
local replicatedStorage = game:GetService("ReplicatedStorage")
local iconModule = replicatedStorage.Icon
local Icon = require(iconModule)
local IconController = require(iconModule.IconController)
local Themes = require(iconModule.Themes)
task.spawn(function()
while true do
wait(10)
--game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
wait(10)
--game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)
end
end)
--game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
--game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
--game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu, false)
Icon.new()
:setName("Coins")
:setRight()
:lock()
:setSize(100, 32)
:call(function(icon)
local NumberSpinner = require(replicatedStorage.NumberSpinner)
local labelSpinner = NumberSpinner.new()
icon:convertLabelToNumberSpinner(labelSpinner)
labelSpinner.Name = "LabelSpinner"
labelSpinner.Decimals = 3
labelSpinner.Duration = 0.25
while wait(0.5) do
labelSpinner.Value = localPlayer:WaitForChild("leaderstats"):WaitForChild("Coins").Value
end
end)
Is there a way to get this working?