Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
1

My PlayerData Folder Creating Script not working?

Asked by 3 days ago

I tried to make a Folder where it will store all player Data such as Level, InGame, etc

But It doesnt work

Here is what I wrote

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(Player)
    -- Create PlayerData Folder

    local PlayerDataF = Instance.new("Folder")
    PlayerDataF.Name = Player.Name
    PlayerDataF.Parent = script.Parent
end)

1 answer

Log in to vote
1
Answered by 3 days ago
Edited 3 days ago

Alright you made a simple error that is a common mistake some scripters do. so heres your script

local Players = game:GetService("Players")
local playerdata = game.ReplicatedStorage:WaitForChild("PlayerData")

Players.PlayerAdded:Connect(function(Player)
    -- Create PlayerData Folder

    local PlayerDataF = Instance.new("Folder")
    PlayerDataF.Name = Player.Name
    PlayerDataF.Parent = playerdata
end)

Alright I changed it up to how you want it. Accept if works or helps

0
Make sure to do capital P on Player cause thats how you stated it on the function DuckyRobIox 180 — 3d
Ad

Answer this question