#why are my leaderstats blank?

1 messages · Page 1 of 1 (latest)

static swallow
#

local Data = game:GetService("DataStoreService")
local TouchData = Data:GetDataStore("TouchData")

game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder", player)
leaderstats.Name = "leaderstats"

local Touches = Instance.new("IntValue",leaderstats)
Touches.Name = "Touches"

local SavedData = TouchData:GetAsync(tostring(player.UserId))
if SavedData == nil then
    player.leaderstats.Touches.Value = 0
else
    player.leaderstats.Touches.Value = SavedData
end

end)

game.Players.PlayerRemoving:Connect(function(player)
TouchData:SetAsync(tostring(player.UserId), player:FindFirstChild("leaderstats"):WaitForChild("Touches").Value)
end)

Why does it not show my leaderstats when I join?

meager raven
#

parent leaderstats to player and Touches to leaderstats

static swallow
#

also

#

How do I turn off suggestions

#

from others

#

its annoying

#

I wanna be able to do my own code

meager raven
#

idk studio settings