So I’m trying to make a game where a platform shrinks but the problem is that when I tween the size of the platform the texture does stay still. I think it’s anchored to the corner of the part so it moves with the corner as it shrinks. Is there any way I could fix this issue, like maybe changing the anchor point of the texture to the center of the part? I know it’s possible with GUI objects but I’m not sure about textures.
Textures have a Texture.OffsetStudsU and a Texture.OffsetStudsV Property that changes the center of the Texture.
Changing the offset doesn’t stop the texture from sliding. It only moves the pictures themselves relative to the corner, not where it is anchored.
If your talking about textures the only way you can fix it is by changing U by the delta size. Maybe this could work,
Not using your variables but as an example.
local inf = TweenInfo.new(1, Enum.EasingStyle.Linear) -- has to sync with the other part
TweenService:Create(Part, inf, {
Size = Vector3.new(10, 1, 1)
})
-- Size was 1, were increasing by 9, which is a delta basically the difference in size
TweenService:Create(Texture, inf, {
OffsetStudsU = 9
})
1 Like
Thank you, this works perfectly.