#Im new and i dont undestand how to use if
1 messages · Page 1 of 1 (latest)
What research did you do and did you find anything?
trying to search smth but i dont get it
like when i use it and how
if you want to check the state of something
local x = 5
if x == 5 then
print("x does equal to 5")
end
else
local x = 3
if x == 5 then
print("x does equal to 5")
else
print("not equal to 5")
end
o alr ithink i never did ==
like why there is local x = 5 and not local x = script.parent
A basic video on if statements should have taught you that
I'm using 5 as an example
im gonna go and learn it now i guess
script.Parent refers to the parent of script
if a script was under ServerScriptService, script.Parent would be ServerScriptService
i learned this from BrawlDev