Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would I make a new folder in ServerStorage?

How would I make a new folder in ServerStorage every time a play joins my game? The folder should be labeled whatever their name is. Also inside the folder their should be IntValues that are taken from the leaderstat. Also if I change a stat in serverstorage it should transfer into the leaderboard in the game. so if i changed level to 6 the leaderboard should say six.

EXAMPLE OF WHAT I MEAN: http://prntscr.com/fwsm1i

1 comment

0

I would use DataStore if I were you. SeverStorage isn't that reliable for saving player data. http://wiki.roblox.com/index.php?title=Data_store

1 answer

ugh, you didn't even post your script.. Here ill do it for you.. how much more easy can this be.. Lets start, the thing you would need the most is Instances, roblox automatically does the leaderboard change, only while using a loop

here..

im too lazy to save the data.. here

remember it won't show on the top right so you will have to script the intvalue for the player to see

script:

-- I will also teach you through the script--

-- first lets make it when the player joins something appears, we will also have a variable once the player joins as their name
game.Players.PlayerAdded:connect(function(p) -- p is the variable, this is when the char joins
	local folder = Instance.new("Folder")   -- an instance in a variable
	folder.Name = p.Name   -- make the folders name, the players name
	local Money = Instance.new("IntValue", folder) -- make an intvalue in the folder
	Money.Name = "Money" -- you want it to have a name and not "Value"
	Money.Value = 0           -- desired value

	local EXP = Instance.new("IntValue", folder)          -- what ever you choose, int or string
	EXP.Name = "Exp" -- name it
	EXP.Value = 0  -- I would really make that a string value

	local Level = Instance.new("IntValue", folder)          -- Level..
	Level.Name = "Level" -- those names again
	Level.Value = 1  -- Level one is fine for me, level 0 is awkward xD
end) -- remember your ends

Untested, made by greatneil80, thanks for using if it works remember to accept answer if this does work

This discussion is preserved as it was. New answers, comments, and votes are closed.