I have a code and what it is doing is moving my part to the position 0 and it goes up starting on 1 and goes to 50 but how do i make it so where ever i put the part it stays there and goes up 50 instead of it being moved to the position 0? Any Help would be much appreciated, Thx!
for i = 1 , 50 do wait(0.001) workspace.Part.Position=Vector3.new(0,i,0) end
You can anchor the part then it's done. You can use CFrame instead of Vector3 incase there is a part in the way like a player so instead of the part's y axis is jumping from 1 to 7, you can make the part go through any part.
for i = 1 , 50 do wait(0.001) workspace.Part.CFrame=CFrame.new(0,i,0) end
If you want it to fall after it reaches 50 studs do this:
for i = 1 , 50 do wait(0.001) workspace.Part.CFrame=CFrame.new(0,i,0) if i == 50 then workspace.Part.Anchored = false end end
No lets help you on your question: how to make the part go up in the position it is already in.
workspace.Part.Position.X = 0 --Notice the X. Position can be split up into 3 parts. X,Y,Z(since this is a 3D game). We can keep the X and Z the same but only change the Y. --Like this: for i = 1 , 50 do wait(0.001) workspace.Part.CFrame=CFrame.new(workspace.Part.Position.X,i,workspace.Part.Position.Z) end
It's really simple. Hope it helps!
EDIT
for i = 1 , 50 do wait(0.001) workspace.Part.CFrame=CFrame.new(workspace.Part.Position.X,i,workspace .Part.Position.Z) --Watch out! This is the part that got cut off. end
Thanks, but i put a touched script in there and now it teleports to the position 0 again:l
function ontouched(hit) for i=1,50 do wait(0.001) workspace.Part.CFrame=CFrame.new(workspace.Part.Position.X,i,workspace) end end script.Parent.touched:connect(ontouched)