How do i make this?

I want to make a script that when a player join it’ll put a folder in them with value, but being a small brain i cant figure it out right.
if you can help it’ll be greatly appreciated!

-also feel free to ask questions in comments

game.Players.PlayerAdded:Connect(function(plr) --player connected
	local folder ="Folder") --created a new folder
	--[ editing the folder]
	folder.Name = ""
	folder.Parent = plr
	--[ creating a value ]
	local value ="ValueNameHere")
	value.Parent = folder

would a datastore be able to save these values? like if i want to save the values would i b able to use a datastore to save them?

Almost anything can be stored as data - therefore, you can save them values.

    local folder ="Folder", p)
    local Value ="IntValue", folder)
    Value.Value = 0 -- you can change it

Put it in ServerScriptService as Script

for sum reason the value wont show up in the values folder

You’d need to specify the type of value in local value ="ValueNameHere"), alongside, it must be a Script in ServerScriptService - don’t forget to name your folder.

    local folder ="Folder")
folder.Name = "Name Here"
folder.Parent = player

 local value ="StringValue") --it can be any value tho
 value.Name = "Value"
 value.Parent = folder

thank you lol, also thanks to everyone who tried helping :slight_smile:

1 Like