Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

the tool are wont save and how to fix?

Asked by 5 years ago
Edited 5 years ago

tool save are wont work and how to fix?

local Players = game:GetService("Players") local ServerStorage = game:GetService("ServerStorage") local DataStoreService = game:GetService("DataStoreService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local SavedTool = DataStoreService:GetDataStore("SaveTool") local ToolsStorage = ServerStorage:FindFirstChild("Storage") local Armor = ReplicatedStorage.ITEMS.Armor local Aura = ReplicatedStorage.ITEMS.Aura local Bomb = ReplicatedStorage.ITEMS.Bomb local Bow = ReplicatedStorage.ITEMS.Bow local Potion = ReplicatedStorage.ITEMS.Potion local Relic = ReplicatedStorage.ITEMS.Relic local Spell = ReplicatedStorage.ITEMS.Spell local Staff = ReplicatedStorage.ITEMS.Staff local Sword = ReplicatedStorage.ITEMS.Sword Players.PlayerAdded:connect(function(Players) repeat wait() until Players:FindFirstChild("Backpack") and Players:FindFirstChild("StarterGear") local Backpack, StarterGear = Players:FindFirstChild("Backpack"), Players:FindFirstChild("StarterGear") local Data = SavedTool:GetAsync(Players.Name) if Data then print(Players.Name.." have saved tools.") for i,v in pairs(Data) do local TargetTool, TargetTool2 = ToolsStorage[v]:Clone(), ToolsStorage[v]:Clone() if ToolsStorage:FindFirstChild(v) then TargetTool.Parent = Backpack TargetTool2.Parent = StarterGear end end else warn(Players.Name.."doesn't have any saved tools.") end end)

0
e DeceptiveCaster 3761 — 5y
0
WHY IS IT ALL MINIFIED D: fanofpixels 718 — 5y

Answer this question