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

positon = position + vector3 works in roblox studio but not in the roblox client?

for i=1,70 do
print("e")
script.Parent.Parent.Door.Position = script.Parent.Parent.Door.Position + Vector3.new(0,0.08,0)
wait()
end

so, im wondering why the loop works but the door isnt moving in client, it prints e 70 times but the door doesnt move, remember that its in a script, not localscript

3 comments

0

dang, its been an hour nobody has replied off

0

I am not a pro or anything, but I think CFrame is better than Position.

0

nobody still has replied, doh!

1 answer

The problem is that you are using Vector3 instead of CFrame. CFrame usually works MUCH better than Vector3 for movement. Although Vector3 is a good way to make parts enlarge themselves.

Use this script:

local door = script.Parent.Parent.Door
for i=1,70 do
	print("e")
	door.CFrame = door.CFrame * CFrame.new(0,0.08,0)
	wait()
end

1 comment

0

I tried it on the door, online, still doesn't work.

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