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

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

Asked by 8 years ago

For example:

BasePlateTransparency = game.workspace.BasePlate.Transparency

if BasePlateTransparency < 1 then
    BasePlaterTransparency = 1
end
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. M39a9am3R 3210 — 8y
0
Oh I know that...I was just wondering if you could use them in Lua cause I wasn't sure XD secretboy6 68 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

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

Ad

Answer this question