Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

(SOLVED!) How do I rotate OffsetStuds? How do I rotate the way the texture moves?

Asked by
ElBamino 153
3 years ago
Edited 3 years ago

Hey scriptinghelpers, I'm working on a conveyor. The conveyor isn't my question it's for context on how I want the texture to move. The arrows (my texture) moving the way the conveyor moves. The texture moves X to Z but, I want it to move X to Y. This is the problem. I tried some stuff but, still couldn't get it to work. Below you will find my code I'm using.

All I need is to figure out how to rotate it so that moves the right direction. How would I accomplish this?

This is a Script inside of a Texture. Texture is inside of a part.

local runService = game:GetService("RunService")

local texture = script.Parent

local function update()
    texture.OffsetStudsV = (texture.OffsetStudsV + .1) % texture.StudsPerTileV
end

runService.Heartbeat:Connect(update)

I solved it, here's the fixed script. Basically I didn't know what U and V meant in XYZ terms. I figured it out.

Answer this question