Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

The Thing doesnt move???? what the hecc???

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

2 answers

✓ Accepted answer

You did not execute the function, but made the function. that's why it doesn't work. Consider inserting this to your last line:

sink()

4 comments

0

i rate this post 11/10

0

oh my god im super duper dumb lmao

0

I'm glad to help!

0

top ten answers of all time

#You didnt call the function

You only defined a funtion as sink() But you didnt actually call it.

to do that you need to add:

sink()

2 comments

0

How did you make huge words?

0

but # before the word

This discussion is preserved as it was. New answers, comments, and votes are closed.