i've been Working in an optimized script ffor my sinking ship game but it just doesn't work. No error messages. No warnings. F in the chat.
--variables
local ship = script.Parent
local P = ship.PrimaryPart
local SeaLevel = 0
--scripting
local function sink()
while true do
local X = P.Position.X
local Y = P.Position.Y
local Z = P.Position.Z
if ship.Trigger1.Position >SeaLevel then
ship:SetPrimaryPartCFrame(
P.CFrame * CFrame.Angles(
math.rad(.01),0,math.rad(.01)
)
)
ship:SetPrimaryPartCFrame(
P.CFrame + Vector3.new(
X,Y -.05,Z
)
)
wait()
end
end
end

4 comments
i rate this post 11/10
oh my god im super duper dumb lmao
I'm glad to help!
top ten answers of all time