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

I don't think my equal signs are registering?

Asked by 4 years ago

local currecyName = "Money" local DataStore = game:GetService("DataStoreService"):GetDataStore("TestDataStore")

game.Players.PlayerAdded:Connect (function(player)

local folder = Instance.new("Folder")
folder.Name = "leaderstats"

local currency = Instance.new("IntValue")
currency.Name = currecyName
currency.Parent = folder

end)

0
The script preview is not working... jordy2co 0 — 4y
0
what's the parent of folder huh? HappyTimIsHim 652 — 4y

1 answer

Log in to vote
0
Answered by
herrtt 387 Moderation Voter
4 years ago

This question was kinda confusing but I have tried my best (the equal signs are registering). You forgot to parent the folder to the player.

local currecyName = "Money" local DataStore = game:GetService("DataStoreService"):GetDataStore("TestDataStore")

game.Players.PlayerAdded:Connect (function(player)

    local folder = Instance.new("Folder")
    folder.Name = "leaderstats"
    folder.Parent = player -- This right here you forgot     

    local currency = Instance.new("IntValue")
    currency.Name = currecyName
    currency.Parent = folder
end)

if this seemed to work an upvote would be appreciated

Ad

Answer this question