what does >= and == means? im new to scripting kinda
== means equal to and >= or <= are greater/less than or equal to
yes i know but what does it do?
== 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
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.
Exactly as this guy said, also you should check the page he linked as there are several operators.
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.
Yeah my mistake I wasn’t paying much attention
What is greater than (> only) in roblox?
> 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
thanks for the advice. It was very helpful