if you have a script and you do this small little script:
1 | local block = script.Parent |
2 |
3 | while true do |
4 | wait( 0.1 ) |
5 | block.Size = block.Size+Vector 3. new( 1 , 0 , 0 ) |
6 | wait( 0.1 ) |
7 | end |
its supposed to change the X size of the part. this is what i mean
1 | < ------ part ------> |
what i mean with "<------ part ------>"
the arrows represent the direction the part changing size
What i want:
1 | < ------ part |
only one way/direction that the part changes the size.
is it possibe?
To do this, you need to extend the block in the forwards direction (the Z component). The issue is that Roblox scales your size changes, as you have noted (it grows in both directions). Basically, you combat this by changing the CFrame as well as the size. See the example below, taken from a devforum post:
1 | while true do |
2 | wait(. 2 ) |
3 | script.Parent.Size = script.Parent.Size + Vector 3. new( 0 , 0 , 1 ) |
4 | script.Parent.CFrame = script.Parent.CFrame + script.Parent.CFrame.LookVector * . 5 |
5 | end |
Here is the devforum post.