#LBStats not poping up in game
165 messages · Page 1 of 1 (latest)
Where "=" lmao?
wym
yea
local MyName = "AVG"
You need that "=" to set the variable
** You are now Level 1! **
Also, when you see red lines, you already should know that there is an erorr
Also, use output, thats more helpful to debug and fix
I mean, newer scripters don't know that yet, so it's not bad if you didn't know
enable this
When you see a red line, a red button or almost anything red, you know there is a problem, that's for almost anything in life
then show us the error it gives
I load red trucks at my job, I guess I'm doing something wrong 🥴 , sorry I had too
it doesnt show an error
anyways, @dim falcon , show us what the script returns
I said "almost" tho :))))
This is not the output
any errors related to this script?
nope
then what's the issue?
the stats wont pop up on lb
Thats a dada script, right? Hope you have API access enabled
is profile.Data.Clicks = nil?
no
Sure about that? Do a print
I hope profile.Data.Clicks isn't a NumberValue
only =nil is have is Manager.Profiles[player] = nil
wait, so can it not receive the profile?
** You are now Level 9! **
btw, are you using profile service?
idk what that is
LoadProfileAsync?
i believe so
are you sure you're not using profile service?
** You are now Level 2! **
does it matter if its in a folder for not
it shouldn't matter if the dotnavigator still gets everywhere it's supposed to go
does this matter
does it stackend?
idk what that means
does the output mention any stack ends
whats a stackend
send a screenshot of the output
no
its supposed to show gems and clicks on the lb
do you've a folder named "leaderstats"?
oh or well, I know you've a folder named that, but is the name exactly "leaderstats"
and is it a direct child of Player
yeah
test the game
then go to the explorer and make a screenshot of the NumberValues inside leaderstats
just to make sure everything is in the right place
well the values (from this code)
no
press start
then go to the explorer
players>(your player)>leaderstats>the values
explorer?
do you see that?
can u vc?
this thing
i have no clue what that is ngl
oh
then press the little error next to your name
then, press the error next to the map leaderstats
then send a screenshot of that in here
what error are u talking ab
** You are now Level 3! **
is there a folder named leaderstats in there?
no
well there's your issue
make sure the code copies leaderstats to the player
then also make the sure the code actually places the values inside the copy
not inside the folder inside the storage
how do i make it copy to the player
well now you need to be careful with the declares
as we want the copy to not have the same declare as the one in storage
wait, is this local or server?
how do i know
i believe its local
this is the code
local Players = game:GetService("Players")
local ServerScriptService = game:GetService("ServerScriptService")
local Template = require(ServerScriptService.PlayerData.Template)
local Manager = require(ServerScriptService.PlayerData.Manager)
local ProfileService = require(ServerScriptService.Libs.ProfileService)
local ProfileStore = ProfileService.GetProfileStore("Production", Template)
local KICK_MESSAGE = "Data Not Found Please Try Again! If This Issue Continues Contact Us!"
local function CreateLeaderStats(player :Player)
local profile = Manager.Profiles[player]
if not profile then return end
local leaderstats = Instance.new("Folder", player)
leaderstats.Name = "leaderstats"
local clicks = Instance.new("NumberValue", leaderstats)
clicks.Name = "Clicks"
clicks.Value = profile.Data.Clicks
local gems = Instance.new("NumberValue", leaderstats)
gems.Name = "Gems"
gems.Value = profile.Data.Gems
end
local function LoadProfile(player: Player)
local profile = ProfileStore:LoadProfileAsync("Player_"..player.UserId)
if not profile then
player:Kick(KICK_MESSAGE)
return
end
profile:AddUserId(player.UserId)
profile:Reconcile()
profile:ListenToRelease(function()
Manager.Profiles[player] = nil
player:Kick(KICK_MESSAGE)
end)
if player:IsDescendantOf(Players) == true then
Manager.Profiles[player] = profile
CreateLeaderStats(player)
else
profile:Release()
end
end
for _, player in Players:GetPlayers() do
task.spawn(LoadProfile, player)
end
Players.PlayerAdded:Connect(LoadProfile)
Players.PlayerRemoving:Connect(function(player)
local profile = Manager.Profiles[player]
if profile then
profile:Release()
end
end)
btw, I just remembered that I use the old icons, that is why yours looks different
wait, so it creates the folder inside the code
i think
and place it inside the player
i think so
can you test the game and quickly check where in the explorer the folder ends up
which folder
so just test, then at the top of the explorer it says "filter workspace"
then search leaderstats
in there
it should look a little like this, but with an actual folder inside the gray
wait
this script is in a local?
no problem