What is the issue?
the issue is that when i use datastore 2 it doesn’t create a folder inside of the local player here is the script:
local datastore2 = require(1936396537)
local default = 0
local player = game.Players.LocalPlayer
game.Players.PlayerAdded:Connect(function()
local points = datastore2("points")
local folder = Instance.new("Folder", player)
folder.Name = folder
local skips = Instance.new("IntValue", folder)
skips.Name = "skips"
local function point(updatedValue)
skips.Value = points:Get(updatedValue)
end
point()
points:OnUpdate(point)
end)
game.Workspace.Part.ClickDetector.MouseClick:Connect(function(plr)
local points = datastore2("points",plr)
points:Increment(10,default)
end)
When creating a datastore you will need to make sure to add a key with the player otherwise it will not work, so far you only added the key, but you forgotten to add the player next to the key.
I am also not sure why you created the Datastore twice, couldn’t you just create the variable of the Datastore as a global variable and then you can access it anywhere in the script?