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

[AWNSERED]Why does the model just break apart?

Asked by 5 years ago
Edited 5 years ago
local ship = script.Parent
local PP = script.Parent.PrimaryPart

function sink()
    script.Parent.button.ClickDetector:Destroy()
    for i= 1,50 do
        wait()
        ship:SetPrimaryPartCFrame(PP.CFrame * CFrame.fromEulerAnglesXYZ(0,0,-.0025))
    end
    for i= 1,50 do
        wait()
        ship:SetPrimaryPartCFrame(PP.CFrame * CFrame.fromEulerAnglesXYZ(0,0,.005))
    end
    for i= 1,50 do
        wait()
        ship:SetPrimaryPartCFrame(PP.CFrame * CFrame.fromEulerAnglesXYZ(0,0,-.003))
    end
    for i= 1,25000 do
        wait()
        ship:SetPrimaryPartCFrame(PP.CFrame - Vector3.new(0,.001,0) )
        ship:SetPrimaryPartCFrame(PP.CFrame * CFrame.fromEulerAnglesXYZ(-.000006,0,-.000009))
    end
    for i= 1,500 do
        wait()
        ship:SetPrimaryPartCFrame(PP.CFrame - Vector3.new(0,.01,0))
        ship:SetPrimaryPartCFrame(PP.CFrame * CFrame.fromEulerAnglesXYZ(-.0001,0,-.0001))
    end
    for i= 1,17000 do
        wait()
        ship:SetPrimaryPartCFrame(PP.CFrame - Vector3.new(0,.05,0))
        ship:SetPrimaryPartCFrame(PP.CFrame * CFrame.fromEulerAnglesXYZ(0,0,-.001))
    end
end

script.Parent.button.ClickDetector.MouseClick:Connect(sink)

context: i've been making this script for a sinking ship game but the model breaks apart

0
Is it anchored? namespace25 594 — 5y
0
yes, it is. The parts dont fall, they just get far away from eachother and end up with a bunch of cracks and separations MradmannMvip 50 — 5y
0
Ok. Try to use a weld constraint script to weld all the parts together. namespace25 594 — 5y
0
I've made one if you want to use it. https://web.roblox.com/library/3159263768/sWeldScript-RAW namespace25 594 — 5y
View all comments (2 more)
0
didnt work MradmannMvip 50 — 5y
0
I'm looking at this code, maybe you could try welding everything together first, and anchor one part, and then unanchor it in the code? A_thruZ 29 — 5y

Answer this question