#code-discussion
1 messages Β· Page 257 of 1
π₯
bruhh
you made an if statement checking if β¨iβ© is equal to 5. if it is, you then make a while loop that will only run when β¨iβ© is greater than 5. β¨iβ© only increments after an iteration of the for loop. also, the condition you setup for loop doesnt allow β¨iβ© to even reach greater than 5 before the for loop finishes
if you want to only print out β¨iβ© when it's 5 and greater, you dont need a while loop. just have an if statement that checks if β¨iβ© is equal to or greater than 5 and print β¨iβ© if true. also, change the condition of the for loop
would anyone mind sparing time to improve my code
it isnt anything too advanced, i made a round system and i could definatly do better just not sure what to improve on
its like 60 lines but i have a bunch of empty space so maybe 40
can someone play my game its a sport game and say if its good or bad
i could take a look
i appreciate it
local Players = game:GetService("Players")
local Max_Time = 10
local RoundBool = false
local ActiveRound = false
local PlayerSpawnPoints = workspace.Waypoints
local SpawnPointChildren = PlayerSpawnPoints:GetChildren()
local PlayersInRound = {}
local function StartRound()
print("Round starting shortly")
task.wait(8)
for _, players in pairs(Players:GetPlayers()) do
players.Character.HumanoidRootPart.CFrame = SpawnPointChildren[math.random(1, #SpawnPointChildren)].CFrame
table.insert(PlayersInRound, players)
end
ActiveRound = true
local Time = Max_Time
while Time > 0 do
Time -= 1
task.wait(1)
end
ActiveRound = false
for _, players in pairs(PlayersInRound) do
players.Character.HumanoidRootPart.CFrame = workspace.SpawnLocation.CFrame
table.remove(PlayersInRound, table.find(PlayersInRound, players))
end
end
local function CheckPlayers()
if #Players:GetPlayers() < 2 then
print("Cant start yet")
elseif ActiveRound == false and #Players:GetPlayers() >= 2 then
StartRound()
end
end
while ActiveRound == false do
task.wait(1)
CheckPlayers()
end```
Any good frontend scripters available?
canany1 pls test my game
dms

bro
if it works it works
improve π
atp remake all roblox main scripts
thatβs what Iβm trying to do π

nah, quality has to be good
no it's just stupid the idea of always improving
quality π
atp u will never finish a game
if u keep always going back oh how can I imrpove this
improve it if there is an issue
one thing i immediately notice is β¨ActiveRoundβ©. you dont need it (at least with what you have so far). when you call a function, the code below that function call wont run until that function returns (unless you used threads but you're not so you dont have to worry about that). this mean, the while loop wont iterate until β¨CheckPlayers()β© returns (if β¨StartRound()β© was called, β¨CheckPlayers()β© will only return after β¨StartRound()β© returns). so you could just change the condition of the while loop to β¨trueβ© for an infinite loop. and any use of β¨ActiveRoundβ© could be deleted. this is assuming this is all it's going to be used for. even if you use it for something else, having the condition for the while loop as β¨AvtiveRound == falseβ© isnt necessary as every time the condition is checked, it's always true (and i assume you want an infinite loop).
β¨RoundBoolβ© isnt being used (idk if you plan to use it)
β¨pairs()β© isnt need in your for loops. you can just do β¨for _, players in Players:GetPlayers() doβ©
for your β¨CheckPlayers()β© function, the β¨elseifβ© can just be replaced with an β¨elseβ© since no other condition is really being checked (if the player count is not less than 2, then obviously the opposite will be true). alternatively, you can also use a guard clause (it's completely up to preference though as they both achieve the same thing).
for your β¨StartRound()β© within both for loops, i would check if the players are alive (unless you want to teleport players even if they're dead) first and if their characters even exists before teleporting.
i would store β¨workspace.SpawnLocationβ© into a variable
lastly, please fix the spacing lol

overall, it's definitely decent. it's just little mishaps here and there. the thing i like the most about your code is that you separate different logic into their own functions and giving them proper names that clearly define what that function does. this is definitely a good practice that you want to carry throughout your coding journey. my second favorite thing is having the constant (a variable whose initial value never changes) β¨Max_Timeβ©. not only do you use a different naming convention for this variable to indicate it is a constant, using a constant like this makes your code easier to edit later down the line. something i would do with the constant is separate it from the other variables so you can easily group and indicate which variables are constants or not
going against pragmatic programming
man this server
asking for help is literally one of the best ways to improve
I appreciate the effort you put into this thank u twin βοΈβοΈ
π
you're welcome
?? what
what help
you want me to send my code and say can anyone help me imrpove it plz
here you go
I mean I see where you're coming from cause 'recode hell' is just annoying
β¨```lua
print("Hello, world")
recoding is different than imrpoving
why do you say that?
like if my script is buggy or takes a lot of memory it's better to recode it rather than **improving **it
why is it always the scripting channels that have ragebaiters
π π
y'all created a so term called ragebait
yeah i founded the word
you only discovered it
recoding often happens with improvement in mind
"if it works it works" is terrible mentality when it comes to software
nha the thing is i dont understand how this can be "good quality" its a fking round script π
it can still be done in a better way bro π
look into software architecture, SOLID, technical debt, DRY, etc
what can you do about rounds bro
it can easily be improved it's violating SRP
wym?
single responsibility principle the function to start a round shown in the code is doing more than starting a round
ah okay
I noticed that too. He could definitely make more functions. Itβs not the worst though
@lost pebble
@echo belfry
@static spear
@fallen ridge
Who got robux dm me
@rapid eagle
DMs
i have 32 robux
DM me
Anyone good at combat systems and lookin to parter up on a battlegrounds game? Iβm a builder with 4 years of experience in studio. Looking to find someone that knows what they are doing and has the same passion for battlegrounds games that I do.
https://streamable.com/r54maa is ts impressive? dont flame me if it is bad please 
No and stop mass pinging
ok improve ur windows
π
wdym?
I meant stop using computers atp what you're calling terrible mentality is the best you can have maybe you're the one who just likes oh it works let's now make it work even better it will never end
there will always be room for improvement
no
yes
once it's improved there's no room for improvement lol
is there any good scripter if yes dm me
yea buddy.
once a piece of code follows SOLID/DRY/KISS I don't see any need in improvements architecture wise
Would someone mind testing multiplayer PONG with me real quick?
Thanks, bro. Will DM you the link
guys i found a "escape tsunami for brainrots" like a exact map replica model package on the marketplace, if i use that, would i get banned?
just released a new oss project
feels good after documenting it
especially without Moonwave
blud there are better serializers
nah
what
I saw one but it benched 30 micro seconds slower
than mine
- mine supports a lot of types
do you want to know the real micro optimisation
dod aint tuff
anyway, what is it
larp.
iti s larp
ok son
queuing writes 4 bytes at a time
bitpacking 4 8 bit writesi nto one 32 bit write is faster
what no
i am talking about my one
son
im crine
yall should i learn modeling first or scripting?
2
not player π π
whichever skill you want
i want both and i wanna know which to learn first
Scripting
it's really powerful
alr, btw i already know py so lua is gonna be easier right?
Oh if you know Python Luau should be a breeze
they are very similar, and you already know programming so you don't have to go thru a lot
ok btw why doesnt this work
local block = game.Workspace.Baseplate.FirstPart
block.color = BrickColor.new("Really red")
alr
anything related to roblox should be easier
yk why ts not working? local block = game.Workspace.Baseplate.FirstPart
block.color = BrickColor.new("Really red")
any errors?
and u can go workspace.Baseplat instantly
no
where is this script in
workspace
no no i dont want anymore i fixed it
what does cancolide do?
type C in color uppercase
dw i fixed it but what does cancolide do?
wether this part can be colided with or not
oh ok
delete this before everyone shits on you
such a family friendly community, shit on me? no they helped me which means ur alone
nerd
too far? same guy who wanted everyone to shit on me
ur twisting my words lil buddy
"lil buddy" ππ
how did u feel after saying "lil buddy" ππ son im crine
ok brochacho
just because i cracked a joke
this is exactly why trump doesnt want to help iran
dont make π‘ traffic in π my channel π
this guy... EFNNNN
good guy woke up
this is why u people have to stay in ur side of the wall
same guy who said "lil buddy" 2 mins ago π
didnt we leave that IN 2024?! ππππ
Listen here
CHUD
u cant stop me from talking in this generation
Ik ur insecure sigh...
what server could i hire good scripter in
idk man
who js wrote that
PlayerGui:FindFirstChild("Main")
how to fix the error? it wont load in time
and return an error
im going crazy with that
me
Use :WaitForChild("Main")
It will yield the script until the object is loaded
luckily i am not a starter and already tried, but nothing seems to work
What's the error?
Warn is fine
You sure the ui is replicated into right spot?
yes
Recheck the script that replicate that ui
Make sure there is nothing yielding the replication from happening
Guys why is it hard to find scripter + animator
being good at scripting and animating is hard
Can devs dm me I'm doing something it's not hiring or anything
w
Is this code organised?
gimme scripting channels
looks pretty good
but why are you using : for β¨DisplayInventoryβ© and β¨DisplayWeaponWheelβ©?
bro anyone know why my studo being gay its making it syntax but code runs but it pmo
show the script
local prompt = script.Parent:WaitForChild("ProximityPrompt")
prompt.Triggered:Connect(function(player)
local playerGui = player:WaitForChild("PlayerGui")
local shopGui = playerGui:WaitForChild("ShopGui")
shopGui.Enabled = true
end)
ok me @ashen narwhal
for requires sometimes you have to close the script and reopen it when things change
show whol1 lin1
dont use pairs/ipairs use generalized iteration, MouseButton1Click is basically superseded by Activated and also i would use components for scripting UI as it doesnt require WaitForChild chains
I deleted it and added it again and it went away
The entire script
Why found a good scripter is so hard

for wh2
Like shop system ragdoll
how can i make a tool that im holding save when i leave, for some reason it doesnt want to save the tool in my character, i tried saving equipped tools in a table and save them that way, but it still doesnt work
Could you further elaborate what you are trying to do?
My inventory system should save all tools (backpack and if player has an equipped one) which is inside the character, but the one that im holding does not save cause the character gets destroyed before the script checks the character so the tool is just gone
You're saying that the tool is parented to the character and when the player leaves, the tool that is parented to the character is destroyed before getting saved in a datastore? Shouldn't it still be saved in your inventory datastore or does your inventory remove the entry when the player takes it out and equips it?
It should be saved within a table; they all are. The UI is merely representative. When the player dies, the one in their hand will remain in the table, but with some variable like... "Equiped"
Yeah exactly, even when you equip an item in an inventory system, the item should still be stored in the table
My datastore saves the new inv when the player leaves, it loops the backpack and saves all the tools in there.
And the character, but the character gets destroyed instantly when they leave, so it thinks that they had no tool
Shouldn't the tool still be in the backpack if its equipped?
Or is it not?
It gets moved inside the character when u equip it
Can i se the script?
See*
ooh then just loop the backpack and store all the tools they have initially?
Hey π
new tools are added/removed in the session
Lol
Could you further explain?
Like the game experience of the player?
You could store the added tools into the session into a table and remove the tools from the table and thus you don't ahve to loop through the backpack
u said loop the backpack and store all the tools they have when they join, the player will lose/gain tools so it will need to save the new ones
Like when hes gonna fall from the place it start ragroll
Make a table that stores all the tools and add an entry when you add a new tool? and remove the entry when you remove a tool from the player
working on ts
Thus you have a table that stores all the tools that player has, even if they leave
replaying
In the vid ur not moving? we only hear ur foot step

umm idk lagging maybe
I think it's better to have more precise, systematic control. For example:
local InventoryClientService = {
Inventory
}
function Inventory.EquipItem(self: inventoryType, player, item)
self.Inventory[item].equiped = true
end
I know, the code looks bad, it's just representative of how I think the control would be better
RBD??
oh weird
Of course you can add variables for better control like "last item equipped," I mean, a loop isn't a good choice
replays everything around you except players by holding R
like FH5 game basically but not perfect
how
like are u constantly saving their positions
Replay everithing? Cool
oh
He probably also saves from time to time
Why use pairs, getchildren already return a table
Does this only work for positions?
but it then it would rewind only certain steps
not as fluid as he did
oh mb , so yea
Make sense
Does this work with positions or with all other attributes?
Properties*
Any combat system makers here
it works with positions, rotations, and animation poses specifically like it saves CFrame for your position and rotation, and Motor6D and transform for your joint poses which captures your current animation frame, plus CFrame of any unanchored parts near you. Sounds hard but nuh
I understand, it seems fun to do
ye
I think I'll take on this challenge
What happens if an instantiated object is destroyed?
yea go on
the system skips it during rewind since it checks if the object still exists before moving it
Hmmm...
I think I know how I'm going to do it. I'll create a table with the current status, objects, and changes, using the changed property indicator, and if the object is destroyed, the code will retrieve the current status and the last properties of that object, and then rotate that table backwards.
Make Sense?
how much r u paying?
oh sry didnt see
so
yea but diff from what i did but yea sure it works
i just made it easier to implement for basiic position rewindingd
but better if you do it in your way
cornball

wouldnt this cause like
lag issues in the long run
oh u can just delete the old stuff
sorry im dumb
mb
@hasty gulch whats the best way to handle hits from many different sources - abilities, melee, etc. like how do battlegrounds games do pvp / hit stuff with cancelling and all that
You need tell me
if you dont mind i can answer , so use single hit processing module
yoo why coding lowk hard like that man
Yes, yes, that's correct, I had forgotten to mention that
crash
no
I felt my PC freezing.
ur message crashed lol
For what
What do you mean by a single hit processing module? Like only one hit can be processed at a time and the other hits just don't care?
yes crash
so no i mean one module that all hits go through
local i = 1
while i < 200 do:
print("no crash")
i += 1
Wouldn't it be better to split it into singular modules for each handler?
both work
Coding seems difficult for the simple reason that people start studying a language, that's wrong, man ππππ
The right approach is to study programming logic, take one or two logic courses, and then start with a programming language
but the single module is better for pvp games
just need to have just few free weeks and thats it
yes but what does this do
like i cant just have a priority system cuz then unique interacts are doomed
and its such a simple system wont allow for cool mechanics
idkkk
it receives every hit in the game, checks if it should go through or get cancelled, then applies the result
u can have both
yeah i know i need this, but what does it actually DO
but idk how to determine WHICH hits should be allowed and which should not
the priority system handles the default behavior, but you add a special interactions table that checks first like "if this ability hits that ability, do this instead" before falling back to normal priority logic ( felt like BrawlDev lol )
is this how most battlegrounds games do it?
when a hit comes in, you check the targets current state and compare it against the attack's properties to decide if it lands, gets blocked, or gets cancelled
yea kinda
so i would need a central state manager?
yes
i have one but it doesnt have a lot of info
like it only says a character is in the "Melee" state or "Blocking" state
wouldnt i need like "Ability", then the ability name, the ability PRIORITY.
etc?
not enough
exactly
state should be like β¨{action = "Ability", name = "Fireball", priority = 3, startTime = tick(), canCancel = false, hasArmor = true, iframeEnd = 0}β© so when a hit comes in you have everything you need to decide what happens
thats a great idea actually
hope i helped
tyyy u did so much
nice gl
ik it might sound stupid, but when should i use tables and dictionaries? as when i save/use data i either put it in a datastore or in a folder
like are dictionaries only good to store images and other stuff that are stationary
Do you use modular code for your projects?
Even the handlers and controllers?
dictionaries are basically a table of variables
a table holds values
dictionaries hold values which hold values
yeah ik the basics of them, but from my little experience it feels like they can just store things like images or items name ecc, nothing useful, so i usually overkill most of the data by putting it in a datastore even when not needed
so my question is, what's a good way to make dictionaries and tables store more than just (stuff with the dot that dosn't change or basic numbers)
more than just as in?
idk i only store images for ui in dictionaries, and for tables i practically never use them as i put everything inside a playerfolder
hey, just curious, is there any way to detect if a player has liked the game?
i think i'm missing the potential of them, plus having a folder with 10+ values makes everything more bloated
that will cause lag
idk if there is a in built function, but i'm sure you can check if a player has premium or joined your group
press altf4
HttpsService
dead joke mate
no im serious
thats what you can use dictionaries for, you dont necessarily need to store the values in instances, you can keep them in a dictionary however its easier to use instances in some cases where you dont want to mess around with replication of data
yeah right whatever
one last question, i store dictionaries in modules right?
you can realistically store them anywhere
personally i store mine on a book shelf
but its up to choice
^
nah
yea
brawldev
BrawlDev to start i guess
dont use youtubers lol
what helped me the most was going outside of what i knew and try new stuff
7 videos in a row doing nothing
wdym
7 videos in a row doing nothing
DONT use youtubers
what do i use then
u need to apply not just memorize
fym "use" them π
roblox ip
no no but how do yall learn tho
wait let me get the website
a year ago, i didn't knew how to make a fighting system, i wanted to learn one, and with wiki/videos/documentation i made a shitty system, but overtime i kept trying and improved
fake
use this https://robloxapi.github.io/ref/
wiki documentations? what did u search
this has literally everything and is better than every yotuuber tutorial
use this with the dev forum
what quoteo put, or the dev forum or just roblox documentation
this wont help if ur a beginner beginner
^ this
use this if you're a beginner beginner then switch to roblox api
website
yea idk shi about scripting
wht even is luau
difeference
lua and luau is very different
luau is for roblox lua can be coded outside of roblox
lua = programming language from other people
luau = lua but modefied by roblox
me when i learned signal if yall know about it
you need lua to learn luau
gta 5 programming
like fivem
they use lua for example
isnt that c++
yea
what does it do?
its a signal
use good signal
this code looks bad
ik
so like more efficient ways to do functions and calling stuff?
basically lets any module talk to any other without them knowing each other exists, its called signal or i think event something
just call it signal
oohh cool, still may i ask why bother when you can just use require or a module handler?
"Circular dependency " just search it
i got a question guys, what is the standard way of saving data? cuz from what i learned playerremoving is sometimes unreliable for crashes and all, so if i save data by calling a function, then put it in an autosave of 60 secs, and once on playerremoving, is that enough?
signal prevent crashes and lets you add features without need touching your main code
profile service or just autoupdate data
every 30 seconds
ngl circular dependency is a big issue in my shitty code, still good to know
i keep hearing about profile service, is it more reliable than standard data saves?
havent reached that point yet
autosave alone is bad
yeah
yeah
understood, thanks everyone
i mean even if you crash data still might not save
so profile service is crash proof aswell? interesting
game:BindToClose
same here, safe to say it is
still might not save
1% change ngl
theres no need to do that though just use profile service
i mostly only use bindtoclose when the server crashes and playerremoving, mostly cause i lack skills to bother to use profile service
yea
just good to know i guess
ik i saw a video, it just has a few functions to learn, what i meant is that i quit like 99% of the projects i make so i don't even bother
well
Ur all chat gpt larps
Ur chat gpt game ainβt making it out the hood
Wowww
if i dont rate limit my remotes can exploiters spam fire them and crash servers?
So we just gonna hate
they get rate limited automatically
u cant do that urself else you have like every time a part spawning
cuz that would take lots of performance
but if its just information being passed you cannot generally rate limit that
what is this i entered
on Roblox what is an argument in Lua scripting
have you learned what a function is?
RemoteEvent:FireServer(color)
the (color) in this case is the argument
basically between ( )
if not, id tell you to learn about it first but if you have, its mainly the values passed in the parentheses when calling a function
who is a good scripter
me what u need
Chat whatβs a good memory usage on the client that u should aim?
memory used depends on the device
just make sure ur not leaking memory
Yeah Iβve had some few memory leak in my code but I fixed that, my memory usage tho on my laptop in game is like around 1500mb and on my phone itβs like 1400mb
Yes I did
Hmmm
1400mb is alright for a phone
if it stays that ur good
Alr then thx
think of it as like as a variable which you send when you call a function
@royal marten arguments are also called actual parameters, you can see them as the values that parameters would be replaced by
β¨β¨```lua
function add(left, right)
local total = left + right -- left = 2 and right = 4
end
add(2, 4)
they also rely on order or position, called positional parameters, so the first argument would represent the first parameter, etc.
@slow plover @digital depot Thank you β£οΈ
guys how to get back old ui
guys people tell me to use dev forum to learn scripting
but i dont get it what do i do im stuck at main menu of the dev forum
and how is that going to help me
Lua Scripting Starter Guide Author: @DarkSinisterPVP Helper(s): @Supersaiyan122 Authorβs Note βΆ Click to open the letter P.S. Iβve tried to make this tutorial as kid-friendly as possible, if it is still difficult to read or understand, please DM me on any platform and Iβll try my best fix it. Specific examples are appreciated. Th...
isnt this outdated?
basics are pretty much the same
whether its a decade old or a few years, the foundation of programming in lua has been the same
the ui would be outdated though tbh but otherwise its okay
can i ask you smth
sure
https://devhints.io/lua for start start
depends what your learning preference is
i learned with youtube videos, but that was 6 years ago and i dont learn like that anymore so
what do you mean
some ppl learn better by writing stuff or actually doing it
some ppl learn better by reading it or just listening to someone
yep, i got inspiration from games that i found fun
i made a rocket launcher and bomb and baseball bat at first and then expanded to interface scripting and then back to learning about the roblox api like data storage, etc.
ngl idk anything about scripting since i got a scripter friend and hes way to lazy to tell me how he learnt
usually i take a script off yt
cuz i dont understand sheet
or i learn word by word
use AI
take pre coded scripts
put them into chtgpt or roblox built in AI to explain it
then if you want u can use that idea to make ur own thing
i mean as someone who is learning, there are 2 ways that im doing it
just keep asking it to make it easier to understand
worst case scenario just ask someone here
first is i was learning luau itself, syntax, and all
second way is trying to actively learn what the code actually is, and why its structured that way, as in what is a method, object, etc
both work but i found the second way more useful long term cuz u then understand new concepts much faster
do you actually try to script or do you just watch and read resources?
i only watch
cuz idk the ways
i think you should try to script
it sticks better when you apply the knowledge
try printing hello world
thats very true
thats a task i can give you to do right now
creating a killbrick should be easy enough
if u want a challenge make the part spawn via the script
no dont push yourself too much
start with the utmost basics
killbricks are easy but i wouldnt try to learn about functions too early
true, i just had prior knowledge from other languages
but i do suggest brawldev's playlists
i already know that burrazerr
well yea idk how to do that lol
local script = script. parent?
thats basically defining the script's location, script is the variable, script.parent is its parent
is this good for a state manager?
local part = script.parent
ok so thats important for this script right
well its not needed just makes it easier
ok so i think ik parent but the "script" what exacly is it used for
becuse everytime you want to refence the part you'd have to type script.parent
script is just the script
like it means itself
hey dude i gotchu
well its not really local script in the start, you would use local part = script.parent, script is the actual script u are currently coding in, the part is the script's parent
ok whats next
so
local script = script. parent right?
no local part
not really, that phrase is like saying the script is its own parent, you are trying to reference 'part', so it would be local part = script.parent as in 'this part contains script, where im coding right now'
ok so if i name the part lets say etateadtra
do i have to type
local etateadtra = script.parent?
no
u can but dont have to
u can do local x = script.parent, its just a reference for the script itself
to know what x is
i dont get it
oh not that
no those are co-ordinates
i hear ppl say x y z
i was just saying u can name it anything
is this ragebait
it really seems like it is
thats the 3d space
starting to have my doubts
ah i see
i do suggest learning the basics like what a variable is, basic syntax, function syntax and utility and so on
it should really help
a variable is basically just giving another name to something, say you wanna set a variable for a part in workspace you'd do
local part = workspace.Part
the word "part" after local is the name of the variable, so after setting that variable you could do part.Color3 which would be the same as workspace.Part.Color3
and what you say after = is what you store in the box
yk what, thats a pretty good analogy
then you can get the value stored in the box by just "finding" the box which is just calling the variable
thats the way my teacher taught it to us
thats a good teacher
i understood 0 things lol ngl
on yt?
thats fine it takes time
maybe i gotta study english a lil bit more
if you want advice
dont expect to learn fast
do you understand algebra?
it takes time
yes something
your not some elite prodigy who can start coding whole games in a day
everything takes time
yea something
personally i studied python and other languages irl which made my lua learning easier, i say try brawldev's playlist on youtube, its very simple and easy to understand, and apply what u learn immediately on studio, and use ai smartly, thats how im learning
when using algebra you have variables, like x = 5 for example, think of code variables the same way, its a shortcut to what you set it as
hold on but i see my friend uses in workspace script.parent so isnt workspace useless? or is this "local part = workspace.part" used in another tab like serverscriptservice or smth
well algebra is just replacing numbers w/ letters
well i went engineering so we only had informatics 1st year we dont have it anymore and i learnt nothing
its more substitution
workspace contains anything you can see, parts, buildings, models, and so on, think of it as the visible roblox world
thats fine, u missed nothing
we all start from 0
real
well the old teacher from middle school just gave us full script to copy paste in our minds
c++ only
yea but wouldnt that be useless for roblox studio?
it was a shit metaphore tbh, ignore what i said
basically u are just referencing its location, as an example lets say im in my room, u would say, local me = house.room.me, idk if this is a valid example but i tried
lol
yeah thats not at all a good way to learn
so like local you = workspace.parent right
i think i said it wrong
also i see they use this at the start of the script only i think
not really, you are trying to find the part in workspace, workspace's parent is game itself, i went down in the hierarchy, not up
ah
so uh when is it used as local.script = script.parent
and local.script = workspace.parent
yk what i mean right?
what
you are pretty off, like i said i suggest watching brawldev's playlist, along with studio practice, and u can ask ai any specific questions, should be on ur way to learning well
Alright thanks
Who wants to be my friend
im having a rough time understanding metatables and why i would use them, could anyone explain it to me?
Well they are mainly for OOP
they hold functions and variables
They basically are classes
Like a class in c++
But say you do this myClass.myFunction()
your basically going to the the classes metatable and calling the function
how do i get out of tutorial hell
It really just takes time
Just start looking at models
see how there code works
And practice very little things
Like miniprojects?
like just small features
When you're watching the tutorials, do you actually apply what you learn or just read/watch ? (Do you actually code/create smth)
Not really π¬
I practice for a little bit then move on
A small recommendation for ya then, maybe try to watch a tutorial, then try to apply it.
If you watched a tutorial for idk, how to open a door with a button,
well now, do the same thing but without the tutorial and without looking at your previously created code. If you forget smth, you can go look and read but try to not look too much. That way, you'll force your brain to rethink about what you just learned.
After a while of redoing stuff / reading, whenever you face a problem you'll see you
You'll remember the stuff where you struggled before. If smth was super easy you'll forget it, if it was hard you'll remember when your struggling for smth else and you'll learn a lot more
Hi I need help debugging something simple . Basically I call something from all my scripts and it works perfectly but then on another singular script i cant call it , it says its nil ... I asked Ai and it told me it might be race conditions which i am unfamiliar anyone knows something else or do i have to go down the race conditions rabbit hole thanks a lot
That's a really good suggestion bro ty
When I watch tutorials, I kinda of cringe when I realize they do something wrong or time-wasting
Pretty hard to debug smth without seeing anything ahaha
yeah sorry ill try to send smt gimme a sec
You aren't a real programmer if you don't debug by spamming print statements everywhere
local ServerScriptService = game:FindFirstChild("ServerScriptService")
local Modules = ServerScriptService:FindFirstChild("Modules")
local DataManager = require (Modules:FindFirstChild("DataManager"))
this basically does not work for ONE SCRIPT it works everywhere else
No problem, hope it helps ! I learned previous langages before Luau so it was easier for me but that's how I got confortable with the syntax of luau
Use WaitForChild("FileName",5)
Yea sometimes it's not the ideal approach and a lot of tutorials waste time, but that's why you try to re-create it after watching. And if you're decently skilled after further learning, you pick up on some mistakes they do and fix them when re-creating the feature.
Your code doesn't have to be 1:1 copy, it can be a small copy of theirs or just copying the feature
Yea
i tried that and it never returned anything it never makes it pass the guard clauses and doe snot print out its cooked lol
You tried WaitForChild?
Wait a minute
Are you putting it in a local script?
Or a normal script?
I think I realize what you did wrong
Rather than using "FindFirstChild" you can use ":GetService("Name") btw
If you are trying to get DataManager from a local script, it returns "nil" because you can't access serverscriptservice on clientside.
π
You need to use a remote event
Ik the thing is im accessing it from a module script
and connect it via script
Where is the module script?
In replicatedstorage?
its in repc
its lowkey weird because the whole script had a problem , i was trying to simply find a part using local part = workspace.Part and it returned nil , then i tried it on another script it worked
Then you should be able to access it
i think i have to delete the script and just retry lowkey its cursed or smt ( very scientific explanation )
Send the full script
local ShopPart = game.Workspace:WaitForChild("ShopPart")
ShopPart.CFrame = CFrame.new(0,2,5)
local ProximityPrompt = ShopPart.ProximityPrompt
local ShopEvent = game.ReplicatedStorage.Remotes.ShopEvent
local Player = game.Players.LocalPlayer
local ServerScriptService = game:FindFirstChild("ServerScriptService")
local Modules = ServerScriptService:FindFirstChild("Modules")
local DataManager = require (Modules:FindFirstChild("DataManager"))
local ShopModule = {}
ShopModule.ClientMessage = function ()
ProximityPrompt.Triggered:Connect(function()
ShopEvent:FireServer(10)
end)
end
ShopModule.ServerValidation= function ()
ShopEvent.OnServerEvent:Connect(function(amount)
print ("YIPPIER")
local profile = DataManager.Profiles[Player]
if not profile then return end
if profile.Data.Coins >= amount then
DataManager.RemoveCoins(Player , amount)
end
end)
end
return ShopModule
Its not cursed, you probably made a super obvious mistake somewhere
ik thanks for your time btw i appreciate it
What the hell is "local Player = game.Players.LocalPlayer"
This is a module script in ReplicatedStorage?
yes
The module script doesn't know what the local player is
really ? no way
It isn't a client script so it should return nil
what do you guys think
i thought it did thanks i think that might be the prob
Cool vfx
Yea for a module script you can do smth like :
local Players = game:GetService("Players")
local player = Players.LocalPlayer
Then for ex :
local playerGui = player:WaitForChild("PlayerGui")
Also you should the first big batch of variables in a init()
i disagree
thanks a lot guys , imma gonna implement the changes appreciate it
any computation should go into β¨:Init()β©
have a good one
variable declaration for small stuff is fine
I don't even use :Init()
π
yea you should use : syntax when you're signalling that youre modifying internal state lol
I just declare the variables in a function called _GetAssets()
or smth of the sort
i always set a β¨self.Initialised = trueβ© variable so
or like when I get services I do _GetServices()
Idk what the point of that is
i then check before :Init() is called if the variable was already set
if it was i warn and return
"Initilisation"
?
Oh shoot Oxford got me
π
lol
yeah lol
Good thing I don't Init so I won't ever make that spelling mistake
Well I do I just don't call it Init
im very aggressive with code structure and project structure
i do
I like to differentiate from internal and external methods
so I use _ for internal and no _ for external
...
Why do you type check every variable, genuine question
Nice you do have good coding structure
It annoys me when people don't use self
π
I'm like, why type extra letters
i only use self in certain situations
Well yeah, you don't want to store certain variables throughout
if im accessing a public variable that's not stored inside of a constructed class, i still do β¨NameTag.GlobalNameTagTableβ©
thats why you use local
even though __index goes back to the original table
Do you use global vars?
? as in variables at the top of the script?
yeah absolutely
probably a bad example, i have scripts with more
Those aren't global variables, they are localized
there's no difference between using local and not using local at the top of the script
since that the top-level scope
?
There is a difference though? Luau complies it differently
how so?
If you don't put local in front of those variables, it compiles slower
Let me find a diagram
@autumn oyster
locals are stored in registers
this also leads to globals having their names exposed π₯²
Otherwise, who would want to type the extra five letters each time you have a variable?
i literally never in my life used global variables
https://www.luac.nl/
very handy website for reviewing what lua code compiles down to what bytecode
not luau but its close enough
How would it make it exposed ?
You set type checking ahead of time? I usually do type checking in the methods themselves
it's stored in a hashtable, with the hash being the variable name
yes as it allows me to export the types
Ooh okay
i also do small type definitions
in the actual functions
and whatnot for readability
Yeah
im not strict on type checking
not literally !strict
Oh I just misunderstood what you meant for "exposed" in this context yikes
:0
I feel stupid mbd
Do people still exploit?
Of course
i used to make cheats for games
I haven't seen a single exploiter since Roblox bought uhh the top exploiting company
Synpase?
smth like that
yea we
had the owner in our discord and he gave us early access to v3
genuinely was amazing dude
People just exploit on mobile mostly I'd say. And there's still some on windows / mac available but risky
its a tradegy it's gone
π
Duality of programmers, one exploits, the other doesn't
I feel like you definitely made some exploit
No? Last game I played was The Strongest Battlegrounds
I needed* that free egg cosmetic
jailbreak? roblox bedwars?
also found a roblox exploit to disable remote functions lol
does anyone have a event bus module they can send so I can get inspiration on how to make one
inspiration
What??
What is an event bus module?
all ur signals and shit in one module
did you play either lol
the way im planning on making it i feel like is not good enough and there is a better optomized way to do it
so im tryna find examples
Search civilian roblox exploiting on YouTube
He somehow gets crazy scripts to run in games using some specific admin
Like turning into a demon or working guns
Using a backdoor in a specific admin*
Oh I didn't even realize you could have all of them in one module
Yeah I've played bedwars
got serversided execution on it lol
????
u can do that straight from the client?
Crazy
This is why you make your own admin system
Look in the videos and tell me if you recognize it
close.Activated:Connect(function()
ui.Visible = false
end)
doesnt work on moble, why?
instakills, anticheat disablers, infinitely paralyzing players, ohhh dude thereβs like hundreds
Roblox made it so that you need to have like Tap or smth like that
Instead of MouseButtonClick1
So you have to code in mobile as well as pc
Wtf
so should I do MousebuttonClick 1 and "Tapped"?
TouchTap?
I'm pretty sure that theres different events for pc and mobile?
@pastel pine Nah don't worry
Scared me for no reason
This should work, unless your UI is a screengui, then you should do ui.Enabled = false
its called ui but its a frame
touchtap doesnt work
Add a print statement inside? and you should do Ui.Visible = not Ui.Visible unless its purely a close button
its purely a close button
Oh then ignore the latter. Is the close variable a button?
in pc it works with buttonmouse
but in mobile doesnt
Activated() should fire when you tap it, its multi-platform
so its just to make it compatible
Are you using the emulator?
doenst work and ik it should work
yes
Everyone was shitting on this steaming pile of garbage but its made me legit more then my main game has this whole weekend
How do I set the character for an animation that affects 2 people?
Or do I play 2 separate anims same time
Wtf is this, tung tung obby or smth π
Cuz I want animation to know who attacker and target is so the correct anims play
How much ad credit did you use?
Whats your ADQPR?
Its called robux brainrot bridge 1000 iq
π
None i used portals in my more popular games to direct players into it
Yes
Oh dang
It's got 468 visits ?
Did you put a print statement inside?
Yes
: /
Yo what is that UI gang
how much did you make from only 468 visits with spammy prompts to purchase stuff π
π
Cant say atm because I didnt use consistent gamepasses, they're all from different other games but I see a 500 robux uptick since I've launched this thing a couple hours ago
Alr
500 robux up tick among both group funds and personal account funds
But its all from this game that IK
I thought you made banks from this bruh. You made 0 from your main game or what
I made like 100
Its been down lately
Getting lower and lower
It used to be 3k a day
Schools back or something probably thats why
Christmas was amazing as well
100k inna week
Cashed it out with some other stuff I made prior for 200k robux dev ex
1k cax
Cad
Go to dms
Sure
How do I make a death screen that fades in and shows text, then when you click on the screen it switched the text and when u click again it closes the death screen
shit man thatβs sick
never made money from roblox
atleast officially
since iβve never published anything
fascinates me that you actually can
I got lucky icl
what would u guys say on average is a good amount to pay a ugc dev to create an outfit including face + classic shirt + classic pants + hair & then an outfit with all of that including accessories most of the time 1 accessory or shoulders + torso
No doubt though with enough skill u can make as much if not more then me
Cant speak on this since I never paid a UGC dev but id consider the quality of previous works if I ever were to commission one in my asking price
Thats all that its really dependent on
At least for mr
Need someone good with a-chassis / physics
Need a small bug fixed paying good
Tbh just post the issue and someone will probably help you for free @sturdy field
say how much usd exactly blud
uhuh
like 100 or more depending if its a hard bug
I'm adding a hitbox for the cars so players cant walk through them etc, but there is issues with entering the car and leaving (the car moves and stuff)
major vague posting
so like the players are colliding with the cars, but you don't want them to move?
Dms ill show a clip of what i mean
NDA?
If your a dev and could help me rn with Global chatting pls dm me
Yo does anyone know how to learn scripting?
brawldev course
guys
What is that?
π Just a reminder to read our rules and use the marketplace to hire!
Hiring or looking for work in our channels classifies as misuse and will result in moderation.
A really good youtuber
Scripter wise
He has a full beginner to advanced scripter course
You should check it
My biggest like problem is remembering it