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

Ship falling apart when clones from server storage or lighting?

Asked by 6 years ago
clone = Workspace.Ships.Ship1:Clone()
clone.Parent = game.Lighting

function cl()
c = game.Lighting.Ship1:Clone()
c.Parent = Workspace
children = c:GetChildren()
c.Anchored = true
wait(1)
c.Anchored = false
end


script.Parent.Touched:connect(function(hit)
    hum = hit.Parent:FindFirstChild("Humanoid")
        if hum ~= nil then
        player = game.Players:GetPlayerFromCharacter(hit.Parent)
        treasure = player.leaderstats.Treasure
        if treasure.Value == 0 or treasure.Value > 0 then
            treasure.Value = treasure.Value - 0
            cl()
        end
    end
end)

This is the script. I have tried multiple different methods including anchoring the parts but the ships that spawn just fall apart even though if they are in the workspace they do not break apart. Is there any way to keep models together when moving to workspace? - Thanks

0
Thanks birdeater11 14 — 6y
0
Np. :) TheeDeathCaster 2368 — 6y
0
surface joints can only exist in the Workspace. SOLUTION: (now this will work for parts too) Model:MakeJoints() right after moving it from ServerStorage or Lighting (and please for god sake use ReplicatedStorage instead of Lighting for replicated storage) fanofpixels 718 — 6y

Answer this question