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

Help needed with CFrame Position Stuff?

So, I'm working on a minigame section of a simulator game I'm making, and there is gonna be a flood escape type map. The issue: I am using this script to make a killing part rise:

while true do
	wait()
	for i = 1,100 do
		script.Parent.CFrame = CFrame.new(script.Parent.Position + Vector3.new(0,0.01,0))
		wait()
	end
end

But... When I actually do use it, it gets stuck under the part. I tried to make it Non-Collide, but it still won't work. Is it a scripting issue, or a physics issue, thanks.

2 comments

0

Maybe multiply the CFrame? script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0,0.01,0))

0

Also, really, move a part on the client side. Because moving parts on the server can get laggy.

1 answer

✓ Accepted answer

You should use all CFrames because Vector3's have collision detection and will move parts under or above if a part is in the way.

while true do
    wait()
    for i = 1,100 do
        script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0.01, 0)
        wait()
    end
end

1 comment

0

Thanks for letting me know. :P

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