So I made myself a custom part tweening engine. Which works (for the most part), but I want to get it to work with CFrame so the block can clip through objects, however, I can't seem to make it CFrame comaptible, It'll keep returning errors like "CFrame expected, got Vector3" or "Got Table" etc, etc.
This is the script.
local parttomove = script.Parent local parttomoveto = script.Parent.Parent.pto function move() local tar = parttomoveto.Position local cur = parttomove.Position for i = 1,100 do wait() parttomove.Position = cur + (tar-cur) * 0.1 cur = parttomove.Position end end script.Parent.ClickDetector.MouseClick:connect(move)
CFrames don't support + and - operators, only * which is adding two cframes together, not multiplying if you didn't know. If you don't care about rotation, you could just do parttomove.CFrame = CFrame.new(v3) If you do want rotations included with the lerp, just use CFrame:lerp(target, alpha)