Heres the script that I have so far
local slot = script.Parent
local loadButton = slot.load
local saveButton = slot.save
local loadFunction = game.ReplicatedStorage:WaitForChild("LoadSlot")
local saveEvent = game.ReplicatedStorage:WaitForChild("SaveSlot")
local gun = game.Players.LocalPlayer.ReplicatedStorage:FindFirstChild("Player's gun"):GetChildren()
local gun2 = game.Players.LocalPlayer.ReplicatedStorage:FindFirstChild("Player's gun")
saveButton.MouseButton1Click:Connect(function()
saveEvent:FireServer(slot.Name, gun)
end)
loadButton.MouseButton1Click:Connect(function()
local data = loadFunction:InvokeServer(slot.Name)
gun = data
end)
I have a spawn script that puts a model that is spawned by the player inside of a folder that is located inside of replicated storage. I have published my game to ROBLOX and this is a save/load script that I have put inside of the frame for a gui that contains a save/load button. Im trying to make it so that if the player clicks the save button on the gui, the spawned model would save and so once the player rejoins the game, they can load it back into the folder by simply clicking load. I dont know if save works but the model is not put into the folder once the player clicks load.