So I’m currently trying to figure out why my texture doesn’t move. I tried editing this post to my needs for Textures instead of UI. The scripts and the arrangement are shown below. Thanks so much from John.
local movingtexture = script.Parent
local bgFr = Texture:WaitForChild("BackgroundFrame")
local fxFr = Texture:WaitForChild("EffectFrame")
local TS = game:GetService("TweenService")
function Tween(obj,prop,info) -- object to animate, properties to change, tween info.
info = info or TweenInfo.new(
1,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
-1,
true,
0
)
TS:Create(obj,info,prop):Play()
end
while true do
fxFr.Position = UDim2.new(0.75,0,0.75,0) -- set position to bottom right
Tween( fxFr, { Position = UDim2.new(0.25, 0, 0.25, 0) } ) -- Tween to top left
wait(1)
end
If they’re frame than you can not have frame inside a texture and if they’re texture texture does not have a position property. What you can do is tween the offset of the texture.
Texture is not a gui
and I don’t know what the script actually above does to the texture, it’s not pointing at the texture to do something or anything
You can make a moving texture by Offset it, texture has the property named OffsetStudsV and OffsetStudsU and you can make a moving texture from it
So this script is for the main problem that texture doesn’t move
local texture = script.Parent
while true do
texture.StudsPerTileV = 0
texture.StudsPerTileU = 0
game:GetService("TweenService"):Create(texture, TweenInfo.new(1, Enum.EasingStyle.Linear), {OffsetStudsV = texture.OffsetStudsV + texture.StudsPerTileV, OffsetStudsU = texture.OffsetStudsU + texture.StudsPerTileU}):Play()
wait(1)
end
in this script, the tween will make the texture pass 1 tile and reset the offset, and repeat.
I reset the offset to avoid passing the max possible integer even idek if that would even happen or not