#Hello I made a script and i am trying to access a surface gui
28 messages · Page 1 of 1 (latest)
nah like my question is I just wanna access "SurfaceGui"
im just wondering if there are any shorter ways thatz this
Just string up some dot nav
so like local SurfaceGui = something something something
so i can have it as a
local
in the script
the script is inside SurfaceGui
local SurfaceGui = workspace.Shit.Shit.SurfaceGui
But you should still dive into guarding your if statements
idk what does this mean
also is this correct aswell?
i mean everything altogether works
just feels long
Basically, try to have your code stay vertical instead of horizontal. It helps a lot when dealing with readability later down the line. It’s just a good habit to get into. Generally speaking it’s advised to keep your code only 4 indents deep, at most. A bit more is still acceptable, but 5+ already becomes hard to read
Anyways, next time when you make satirical code, just loop through all descendants a few times and use a bit of syntax sugar. That’s way more fun than just indents
got it
whats syntax sugar
Dive into it, it’s fun
I couldnt make it longer cause it already
is longer than my screen
You took the fun out of it tho 😔
you can do shit like
local Syntax = print
local Sugar = “Hello World!”
Syntax(Sugar)
ah