What do these mean?

what does >= and == means? im new to scripting kinda

2 Likes

== means equal to and >= or <= are greater/less than or equal to

2 Likes

yes i know but what does it do?

2 Likes

== means equal to and >= or <= are greater/less than or equal to

for example in a script it could be

local number = 2

if number == 2 then
-- If number is equal to 2 then do something
end

or

if number >= 2 then
-- If number is greater than or equal to 2 then do something
end
2 Likes

whats the difffernece between == and = though cant you just use the same??

== is only for operators

= is for defining variables (booleans, strings, functions, etc)

There is definitely a difference
You should read the link I posted above.

1 Like

Exactly as this guy said, also you should check the page he linked as there are several operators.

1 Like

oh ok … dont mind this just trying to take up space cause of the 30 letter thingy

I believe you said this the wrong way round, <= is the condition for Less than equal to.

1 Like

Yeah my mistake I wasn’t paying much attention

1 Like

What is greater than (> only) in roblox?

1 Like

> is greater than.
< is less than.
== is equal to.
>= is greater or equal to.
<= is less or equal to.
~= is not equal to.

= is for defining variables and setting values.

local myNumber = 7 --using = to define the variable 'myNumber'
print(myNumber > 7) --false, because 7 is not larger than 7
print(myNumber < 8) --true, because 7 is less than 8
print(myNumber == 2) --false, because 7 is not the same as 2
print(myNumber >= 7) --true, because 7 is the same as 7
print(myNumber <= 10) --true, because 7 is less than 10
print(myNumber ~= 5) --true, because 7 is not the same as 5
4 Likes

thanks for the advice. It was very helpful

2 Likes