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

how i make a part clone with his childs?

Asked by 1 year ago

im making a skins system and when i put all the effects of a skin in the folder with the base part when i clone the base part it doesnt clone with his childs(the effects of the skin)

Global script

local Pos = game.ReplicatedStorage.LaunchTruss --/-RemoteEvent




Pos.OnServerEvent:Connect(function(player, Mouse)
    local char = player.Character or player.CharacterAdded:Wait()
    local folder = char:WaitForChild("gfx")
    local Ladder = folder:WaitForChild("KLICKPART"):Clone()
    Ladder.Parent = workspace
    Ladder.Anchored = false
    Ladder.CFrame = CFrame.new(Mouse) * CFrame.new(0,3,0)
    wait(5)
    Ladder:Destroy()
end)

Local script

local player = game.Players.LocalPlayer
local char = player.Character
local keyboard = game:GetService("UserInputService")

local ROOT = char:WaitForChild("HumanoidRootPart")

local folder = game.Players.LocalPlayer.Character:WaitForChild("gfx")
local part = folder.KLICKPART
local mouse = player:GetMouse()
local db = false
local db2 = false


keyboard.InputBegan:Connect(function(io, key)
    if io.KeyCode == Enum.KeyCode.E then

        if not db then
            db = true
            game.ReplicatedStorage.LaunchTruss:FireServer(mouse.Hit.Position)
            wait(5)
            script.Parent.TextLabel.Text = "E : USE TRUSS PART"
            db = false

        end
    end
end)

keyboard.InputBegan:Connect(function(io,key)
    if io.KeyCode == Enum.KeyCode.E then
        if not db2 then
            db2 = true
            for i = 4,0,-1 do
                script.Parent.TextLabel.Text = i
                wait(1)
            end
            db2 = false
            end
    end
end)
0
Are you sure the effects are inside the basepart? Xapelize 2658 — 1y
0
the effect are in the replicated storage part and when they press the button to equip the effect then i clone them to the base part ImDragron 7 — 1y

Answer this question