Random true variable

I always see this weird variable/attribute in scripts and wanted to know what it was for.

local ab = true

--function

local ut = ab

ut = false

while ab and object
--function

ut = true
end

in all the scripts containing it, it doesn’t generate an attribute, nor does it have any “if” statements that reference it

1 Like

ut is a local variable that initially takes the value of ab and can be modified later in the script. Its purpose and functionality may depend on the specific context and code surrounding it, but it appears to be used as a flag or condition variable within the script.

1 Like

But why does it need to keep getting changed? UT never gets used or anything, so I don’t see the point in having it in the first place.

If its unused then try deleting the line and seeing if anything changes.

Probably an occams razor stype situation. The simplest explanation is that the previous scripter was planning to use the variable, didnt, then copy and pasted some stuff.

Personally never saw this before.

1 Like

Yeah, it doesn’t really need to be there anyway, as it’s just a CFrame script, not some complicated script covering half of the game.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.