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

How to do auto save for tools such as saving a player's sword?

I never thought of this before but autosaving tools seems like an interesting thing. I can't find a link anywhere for Autosave Tool, but it would be awesome if someone were to teach me this concept.

1 answer

First
You will want to create a script in the workspace. This script will create an IntValue In the player that will state if they own a sword

local parent = script.Parent
local player = game.Players.LocalPlayer
local sword = Instance.new('IntValue', player)

game.Players.PlayerAdded:connect(function()
	sword.Name = "SwordOwned"
end)

Second
You will want the game to save Here is the roblox wiki article http://wiki.roblox.com/index.php?title=Saving_Player_Data Lastly In the article, where it talks about loading the data put that in the First Script under sword.Name

Hope This Helped

1 comment

0

You can't use LocalPlayer in regular scripts, only on studio. Local Scripts don't work in workspace. There's almost never a reason to use a PlayerAdded event in a Local Script.

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