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

How to make an object move 1 stud 50 times?

for i = v do
game.Workspace.Part.CFrame = CFrame.new(1,0,0) end How do I make it so it moves (1,0,0) every time rather then goes there for 50 times.

1 answer

✓ Accepted answer

It does. It just does so instantaneously. Add a wait() to the for loop.

Edit: Just noticed the actual issue (I blame lack of multiline code block :P)

game.Workspace.Part.CFrame = game.Workspace.Part.CFrame * CFrame.new(0, 0, -1)

For local space translation, or

game.Workspace.Part.CFrame = game.Workspace.Part.CFrame + Vector3.new(0, 0, -1)

For world space translation.

2 comments

0

But the thing is my script gives it a location right? Or does it not? And where does it go.

0

I did not read correctly. Oops. I will amend it. In future, put it in a multiline code block

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