I've been trying to code a sinking ship, still not done yet, im working in the moving part.
Although, when i click the button to run the script, the thing nopes out of there and goes into low earth orbit. Anything i need to change?
local ship = script.Parent local PP = script.Parent.PrimaryPart function sink() while true do for i= 1,1000000 do ship:SetPrimaryPartCFrame(PP.CFrame * CFrame.new(PP.CFrame * Vector3.new(0,-0.01,0))) wait() end end end game.Workspace.button.ClickDetector.MouseClick:Connect(sink)
~~~~~~~~~~~~~~~~~
Try using..
local ship = script.Parent local PP = script.Parent.PrimaryPart function sink() for i= 1,1000000 do wait() ship:SetPrimaryPartCFrame(PP.CFrame + Vector3.new(0, -0.01, 0) ) -- decreaces the y axis by -0.01 end end sink()