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

How would I make this save?

Asked by
Dr_Doge 100
9 years ago

I realise why this wont save, but dose anyone know how I can fix it?

local Gui = script.Parent
local Player = Gui.Parent.Parent.Parent
local Char = Player.Character
local part = game.Workspace:FindFirstChild("Part")
local Value1 = Player:findFirstChild("Save")

function onClicked()
if Value1 ~= nil then
Player:SaveNumber("Save", Value1) -- Its because it says Save Numbers and Im trying to save Blocks
end

    if game.Workspace.Part ~= nil then
    Instance.new("Folder", Player).Name = "Save"
    while wait() do
        wait()
        if game.Workspace.Part~= nil then
            game.Workspace.Part.Parent = Player.Save
        end
    end
end
end

Gui.MouseButton1Click:connect(onClicked)

1 answer

Log in to vote
1
Answered by
1waffle1 2908 Trusted Badge of Merit Moderation Voter Community Moderator
9 years ago

If it's an Instance then you need to use SaveInstance and LoadInstance.

Ad

Answer this question