##Normal Stats Script
This would be a normal leaderstats script:
--\\ Services
local players = game:GetService("Players")
players.PlayerAdded:Connect(function(player)
local stats = Instance.new("Folder")
stats.Name = "leaderstats"
stats.Parent = player
local randomValue = Instance.new("StringValue")
randomValue.Name = "Random Value"
randomValue.Value = "oof"
randomValue.Parent = stats
end)
##What Is My Question?
I noticed, is this really the best way to make stats? Is there an even more secure(and probably optimized way). I am saying if there is a much more secure way to approach this because it doesn't even use any Remotes. I am just curious to see if there are any different (and probably better) approaches.
Thank you for helping me in advance

6 comments
this may not work i didnt test it and it may glich
Learn to indent your code! It makes reading it much easier
You should never parent a new Instance before changing its properties. It is a good optimizing technique to simply make the instance(without its parent), then, change its properties, finally, you should parent
If I were to change my string value(randomValue) and make it an IntValue and name it to Level. The level would change. What would I do in that situation?
the same thing just change the name an values
I know that. But, what I mean is this: if the level would change its value after killing some mobs, what would I do in that situation? The value won't be consistent all the time