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

How do I CFrame something without using coordinates?

For example, you can use the Position property to add a Vector3 to a part's position like this**:**

part = script.Parent

while true do
	part.Position =  part.Position + Vector3.new(0, 1, 0)
	end

That would make my part go up, but if something was in the way, it would teleport over the something. I would like to know how to do something like that with CFrame values.

Is my question confusing, or a solution impossible to provide?

1 answer

✓ Accepted answer

This is what you'd do buddy:

part = script.Parent

while true do
	wait(0.1) --Wait times are always good to have, it prevents the game from crashing and helps prevent lag.
	part.CFrame =  part.CFrame * CFrame.new(0, 1, 0)
end

1 comment

0

Thanks, man! I'd just forgotten to add the wait.

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