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

how do i make f3x cloned part go to workspace?

Asked by 5 years ago
Edited 5 years ago

i am doing a building game but every time someone regens the stand the parts cloned from that spawn also get removed becouse they stay in the same folder, any help? this is what i got when i searched clone

function CloneSelection()
    -- Clones selected parts

    -- Make sure that there are items in the selection
    if #Selection.Items == 0 then
        return;
    end;

    -- Send the cloning request to the server
    local Clones = SyncAPI:Invoke('Clone', Selection.Items, GetHighestParent(Selection.Items))

    -- Put together the history record
    local HistoryRecord = {
        Clones = Clones;

        Unapply = function (HistoryRecord)
            -- Reverts this change

            -- Deselect the clones
            Selection.Remove(HistoryRecord.Clones, false);

            -- Remove the clones
            SyncAPI:Invoke('Remove', HistoryRecord.Clones);

        end;

        Apply = function (HistoryRecord)
            -- Reapplies this change

            -- Restore the clones
            SyncAPI:Invoke('UndoRemove', HistoryRecord.Clones);

        end;

    };

    -- Register the history record
    History.Add(HistoryRecord);

    -- Select the clones
    Selection.Replace(Clones);

    -- Flash the outlines of the new parts
    coroutine.wrap(Selection.FlashOutlines)();

end;

0
Can you provide some code? User#834 0 — 5y
0
k VykaGaming 7 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

You can change the parent of an object like so, if this is what you’re asking about:

object.Parent = workspace

Happy Holidays :D

0
yes i know but i cant seem to find which line to put it on VykaGaming 7 — 4y
Ad

Answer this question