Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can you use < or > signs the same way you use = ?

For example:

BasePlateTransparency = game.workspace.BasePlate.Transparency

if BasePlateTransparency < 1 then
	BasePlaterTransparency = 1
end

2 comments

0

Ehh... Not exactly. < and > indicate if a value is more or less than what it is being compared to. In your case you're trying to determine if the baseplate's transparency is greater than 1 then to set the value equal to 1. <= mean less than or equal to, >= means greater than or equal to, == means is equal to.

0

Oh I know that...I was just wondering if you could use them in Lua cause I wasn't sure XD

1 answer

it depends on what ur doing. for example

if derp.Value> 25 

is completly diferent from

if derp.Value = 25

but in that sense u can use greater/less than or equal too

if derp.Value >= 25 then
print(derp.Value)
end

essentially, using greater than or equal to is much better

This discussion is preserved as it was. New answers, comments, and votes are closed.