#code-discussion
1 messages · Page 261 of 1
Version control with branching
That’s all I can think off
I suppose
Roblox's version control is just linear
Mhm
What does that mean
You can only go forward
Damn I have a lot to learn
Like you bee working at multiple versions of a project at the same time
Think of it as alternate timelines.
Linear just means a single timeline
YOO I was just about to say that
Could u give an example please
Have you watched Loki @left kite
I have :D
Just like what’s in Loki
Have you used other scripting languages
Yeah
Lets say I want to test out an experimental change. I can make a new branch and do the change on just that branch. That way I can continue to modify and test on the main branch without having to worry about my experimental changes impacting it. Then when I decide the experimental changes are going to make sense and work, I can merge them back into the main branch.
Yeah that’s about it
It’s also very good when you have a lot of people
One person can work on one thing without messing up somone else’s work
Then merge once each person is done
(I also hate merging)
honestly i have no clue how people even organize themselves to work with several other scripters
Oh shitttttt I see
I mean it’s using GIT
That’s how I would do it
NP
You just assign systems or tasks to people. Ideally you have some lead, that organizes and tells people what needs to be done.
Mhm
It is annoying though when other people have different coding styles
This one guy on a project just won’t use fucking modules
i mean yeah but when it comes to game dev i feel like past a certain point like defining a general structure everyone has their own way of coding things
like I'm working with only one other scripter and yet the way we do it is that if i say I'm gonna be making the combat that means i will make the entire combat system without him making any changes to it
Ima start using modules tho
Cuz I ain’t tryna be a weirdo
For small stuff using just regular scripts is fine
Just when it gets bigger it’s better to use modules
Yeah but still
even with modules lmao I'm coding a game using single script architecture and the one time we tried merging a system where i coded half and he coded the other half it took longer to connect both halves together than if we were to do it by ourselves

Geneiuely
Yeah, that’s why each person should work on one script
hopefully i will never have to work with like several other scripters cuz it's actual hell
Well your going to need too if you plan to get a job in programming

Or it all gets taken by AI and I’m going to go to collage for nothing
absolutely not chat 
ai engineer ✌️
scripting is like the very last option
yeah that’s the only job Gina be open
I mean this only happens if AI gets much better
oh dw i already went to college for nothing and failed Algorithms spectacularly but at least i didn't have to pay anything 
I’ve tried using it and it still can’t code anything complex
Okay I gotta go to bed
Bye
yeah for anything remotely complex you spend so much effort making sure the AI doesn't lose context and the structure is robust enough to not lead to future issues that it's more or less the same amount of effort as coding it yourself
And even then you incur significant technical debt because you don't know how the system works unless you read through the entirety of the program.
exactly
👆🏻
AI doesn't really help you if you don't know how to code it yourself
IMO I think ai should be used in coding but only to help not take over
But that’s my opinion idk
Yeah you have to be able to guide it with the right questions
Maybe later you won’t have too🤷♂️ who knows
There is a good Anthropic study on AI usage in programming.
I hope I can still do what I love to do🙏🙏
Let’s hope it doesn’t happen in the next 50 years
I doubt it but hope
Yooo you play US soccer
yeahh
What league
MLS next now
W
I’m trying to get to ecnl
Hope u make it
Thx
whats the best way to get real developing experience, like working with others, like real game making experience
For me it depends what ur looking for
and where ur at in ur knowledge of coding
But if u want professional
i dont think im like beginner beginner
but ik im not like professional level
but i feel like rn the best way for me to get better is experience
Alr h should prolly try and work at a studio
i want to, but i havent been able to find any to work for that arent some like extremely small thing
yes definitely
you get real developing experience by developing games
which will most likely flop or never get released till you get good at it

i do try and work on games
but then its annoying and time consuming when it comes to needing things like anims, vfx, or builds
if you want to make sure you are working with a good dev ask them to show you their failed projects
exactly bruvv
learn these too

Yeah or if u have money or connections
do all this and stay motivated
Then
yeah it might take a few years
ontop of other things in my life too
i wanna have a decent game by like a year from now
the way game dev goes is that your very first skill is the one that will take the longest to get good at
and then it gets progressively easier
so like if you learn modelling you will have a much easier time picking up animation and the other way around is also true
with you having zero experience rn? i mean it's doable but like very difficult
chopped
i am sleep deprived 
All the skills have there hidden limiting factor. Programming's is problem solving
im fine with that
but like i want like a clear path
That's what takes the longest to build
there is no clear path
honestly just start with whatever you find most fun
It really just depends on your definition of "decent".
well
plus unless you have alot of money or alot of connections you will end up having to learn almost everything anyways 
i want to have a game out thats good enough to shine on my college apps
There are plenty of games out there that have HORRIBLE code and assets, but they're fun to play
true
good stat wise
nope
i have been scripting for like a good year now prob
but feel like i havent really moved up a ton
are u practicing every day
just get started on something that is a bit above your current skill level and be too stubborn to give up
your 3 hours a day will quickly turn into 16 hour long workshifts
skill issue
lemme stop procrastinating already and go to sleep
it's day 5 and I'm already dying but i think i can finish the whole game in less than a month
Well how much do you know? Because there is a point where Roblox scripting kind of stops being just learning the Luau syntax and Roblox API. It transitions more into organization and how to build a system that can scale well. At that point it does feel like its hard to move up, while also feeling like there is a TON you don't know
i hope i can finish my game bruh
one script architecture my goat
what the fuck is oop
im confident in my knowledge on the syntax
at that point u just gotta learn more specific stuff rather than general programming things
its def the organization and system stuff
and i feel like
theres so much different things to do
use modules
i do
use oop
I'd argue the opposite. It becomes more learning algorithms, structures, etc. That can be applied generally across most lanugages
the game I'm making has nothing but modules shit is so meta
this is what im currently like learning, ik how it works just not when to apply it and how often
u dont always have to make a class for everything yea sometimes a simple table is enough ye
OOP is mainly useful when you want to tie functionality to the state its acting upon
just think when u think a class is good because that offers features than just a value in a table
so if u need those features then use it but if not dont
You can get away with not using any custom OOP. Obviously Roblox uses OOP for all of its API, so you're still using it even if you're not making custom classes
In Luau the only difference to having functions to act on passed state, and OOP is that OOP uses metatables to link the functions directly to the state.
okay ill keep that in mind
If ur a Scripter and wanting to work on something useful pull req my library… it needs some work
I used to use a ton, which I think is generally the case when you first learn OOP. But the more you use it, the more it does start to feel bloated and unnecessary. Currently I use OOP occasionally when I find it makes sense or helps me organizationally, but its not something I reach for that often.
Functional programming is much easier in a lot of cases and removes the overhead of metatables.
I think coding with a oop mindset should be every luau scripters goal in organization
Functional programming is good in more simpler cases
Coding w a oop mindset is gonna help you reuse a lot of your code for a lot of different systems
The thing is, the Roblox API is already mainly OOP. It's very common from what I've seen for people to take some instance and then wrap it in their own class just for the sake of adding a couple states to it. People wildly overuse OOP
I agree
Tbh it’s whatever makes it easier for YOU and your team to understand
Why are you passing self for these functions? EasyMath.Tween:Hover()
Poo
If I wanted to delay that tween operation for example using task.delay I'd have to do:
task.delay(DURATION, EasyMath.Tween.Hover, EasyMath.Tween, ...) --> ... being the arguments required
Bad example, but you get where I'm coming from lol
I’m passing it vecause I’m gonna use self in future
Personally, this looks like what we were just talking about. Not a case for OOP lol
it’s a work in progress but its lowk also a Habit
I want to also add Per-tween configuration so
ahh ok, I was just wondering lol
I’m gonna use self
You should totally pull request n make it better it’s open source
I'll look through. Doesn't look like something I'd necessarily use, so idk if I'd contribute because I don't really understand goal here. But maybe the pathfinder stuff, haven't looked at that yet.
Im not sure how, but when i hit an object and ragdoll, it lag anyone have idea why
It’s like 3% done it’s gonna be a whole math library so things like advanced pathfinding, tweening, curves, and anything having to do w calculations
eeeeeee
Horror games def, custom physics, any game w procedural movement, npcs, etc…
Js for devs who wanna save time
I’m also wanting the tweens to detect anything including like camera (for camera shakes or tweens)
Most of the tween stuff is just simple wrappers for TweenService, which isn't ideal especially when its making decisions like fading both text and background for GuiObjects.
Ik ofc tween module isnt close to done but it’s only the start
I’m ofc gonna implement better functions and expand on the current ones to make it’s use flexible
I'm not saying it looks unfinished, I'm just saying I don't really understand why I'd give up the finer control of TweenService to use a module that I still have to enter most of the values for anyway.
For more advanced tweens or multiple looped tweens
Something like a sin tween w a hover tween would take longer than js typing in the values u want the functions to do
Just tell the hover function from here to here and rotate this much (or infinitely) at this speed
I'm mainly referring to the wrapper functions, I think those should be dropped probably. Let people use the module for the more complicated stuff, while enforcing they use TweenService for the simpler things.
If you have functions like that you're going to have people using them unknowingly adding unneccessary overhead for things they can easily just do with TweenService.
Creating bad patterns.
You’ve been at ts for like 5 hours
For like 30 minutes :3
Not even you started yapping at the start of my shift
Boi it’s been 5 hours
almost 2

Sent my first message 5 hours ago if thats what you're talking about..
But I wouldn't say I've been active in the chat for that long lol
Yes you have bro
🫡 YES SIR
ik people can usually USE tween service but the important part is that its going to be SAFER, gives more control, and simpler to use, even for a fade out function, something like fading out a frame (with like alot of children) in tweenservice is going to be way more work than just doing the :FadeOut using the module. its why people use ProfileService over Datastoreservice (if they are serious about making games). because overall its safer and gives more control
locked in
I am
no.
I guess I'll just have to see when more work has been put into it
HE is locked in
yes 🙏
simpleNet.listenServer("buyItem", function(plr, itemName)
local itemData = shopItems[itemName]
if not itemData then return end
if itemData.product then
MPS:PromptProductPurchase(plr, itemData.product)
return
end
if dataService.getData(plr, "Coins") < itemData.price then return end
dataService.incrementData(plr, "Coins", -itemData.price)
dataService.addOrIncrementData(plr, "inventory."..itemName, 1)
AS:LogCustomEvent(plr, "Buy Item", itemName)
end)
Is this the correct way of using analytics service? itemName is a string.
its only been like a week project rn cs i got work n school i barely got time to work on it
Like I said, I don't really see the vision. But if you've got this big idea I'm not going to get in your way. Innovate and make that shit happen
LogCustomEvent does not take a raw string as the third argument.
something like
use a table
AS:LogCustomEvent(plr, "Buy Item", {
item = itemName,
})
To fade out alot of ui elements just put them in a canvas group
Alright thank you
is there a thank command here?
https://create.roblox.com/docs/reference/engine/classes/AnalyticsService#LogCustomEvent
Takes a number as the third argument 
ik but what if you want to control different parts at different times accross the game
im making the tween module so you're able to control tweens better and so it saves u the work
#⭐creations message
what do u think about this
Very neat :D
I guess thats good then
tghanks boss
I'm assuming the white means inactive, in terms of navigation? Why do some of the ones at the back turn white? Standing still for too long because of the ones in front of it?
they turn white if the target is not moving and they are not making enough progress quickly towards the target
then they just walk in a straight line to target instead and stop when they hit something in front of it
Are you using any neat algorithms? I was working on something similar a little while back, and I just used a module for flow fields because I couldn't be bothered to implement it myself.
still seems kinda scuffed idk if it will look good because there is a lot of pushing around so maybe i can reduce that and also at 200 boids it starts to lag
i use boids
Ahhh okk
and based it on sebastian lague code
its not that crazy but theres just 4 properties of boids
target steering
alignment steering
cohesion steering
avoidance steering
also his is 3d mine is 2d so its more simple
just made this script that makes the button explode when you click it 25 times, please be brutally honest because i am just starting and i want to make it as professional and as good as possible how bad is it
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("IntValue", player)
leaderstats.Name = "leaderstats"
local clicks = Instance.new("IntValue", leaderstats)
clicks.Name = "Clicks"
clicks.Value = 0
local function click()
game.Workspace.button.Size = Vector3.new(0.19, 0.922, 2)
clicks.Value += 1
wait(0.25)
game.Workspace.button.Size = Vector3.new(0.456, 0.922, 2)
end
game.Workspace.button.ClickDetector.MouseClick:Connect(click)
while clicks.Value <= 25 do
wait()
if clicks.Value >= 25 then
local explosion =Instance.new("Explosion", game.Workspace)
explosion.Position = Vector3.new(0.661, 3.033, -1.616)
wait()
game.Workspace.button:Destroy()
game.Workspace.Part:Destroy()
game.Workspace.part:Destroy()
end
end
end)
also the button goes up and down when you click it
yes please
You bind the ClickDetector inside PlayerAdded
like i know its terrible
This is a huge logic flaw
so how does it work
You destroy three parts with hard‑coded names also
cus im hella confused
ive been hearing that word alot what is logic in scripting
the issue is that your logic is in the wrong place and your structure is fighting you. move all button related logic out of PlayerAdded, because connecting a ClickDetector inside that event multiplies connections per player and breaks the click count. treat the button as a single global object with a single click handler, and treat leaderstats as perplayer data that shouldn’t control global destruction. replace your while loop with a .Changed or threshold check so you aren’t polling every frame. n PLEASE avoid hard‑coded Workspace references. js store the button, parts, and explosion position in variables or use relative positions so the script doesn’t break when the workspace/map changes. And finally, visual effects should be on the client for the button press animation so it feels smooth n doesn’t lag.
All of programming is logic lol
yea but like what exactly IS it
It's basically the same as the ordinary meaning for logic. It's just reasoning.
If this then that
gotcha
in coding there are two main things that happen, data and procedures. data is stuff, and procedures are what you do with the stuff
logic refers to the procedures part, saying "this is a logic flaw" is saying the steps you're taking in manipulating your data are flawed, you're solving your problem wrong
so like theres a better way to do it
like if i was adding 1 to 1 in math instead of subtracting 1 and adding 2 i can just add 1
yes exactly
ok gotcha
im like really new to this so i dont know any of the better ways to do stuff
i literally just now found out what tables do
thats fine
local button = {game.Workspace.button, game.Workspace.Part, game.Workspace.part
}
first time using that
then made it
button:Destroy()
yo is this better
local button = {game.Workspace.button, game.Workspace.Part, game.Workspace.part
}
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("IntValue", player)
leaderstats.Name = "leaderstats"
local clicks = Instance.new("IntValue", leaderstats)
clicks.Name = "Clicks"
clicks.Value = 0
end)
game.Workspace.button.ClickDetector.MouseClick:Connect(function(player)
local clicks = player.leaderstats.clicks
while clicks.Value <= 25 do
wait()
if clicks.Value >= 25 then
local explosion =Instance.new("Explosion", game.Workspace)
explosion.Position = Vector3.new(0.661, 3.033, -1.616)
wait()
button:Destroy()
end
end
end)
I wouldn't really say its about doing it a better way, even though there is. A "logic flaw" or "logic error" is when you think your code is doing one thing when its actually doing something else.
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("IntValue", player)
leaderstats.Name = "leaderstats"
local clicks = Instance.new("IntValue", leaderstats)
clicks.Name = "Clicks"
clicks.Value = 0
local function click()
game.Workspace.button.Size = Vector3.new(0.19, 0.922, 2)
clicks.Value += 1
wait(0.25)
game.Workspace.button.Size = Vector3.new(0.456, 0.922, 2)
end
game.Workspace.button.ClickDetector.MouseClick:Connect(click)
while clicks.Value <= 25 do
wait()
if clicks.Value >= 25 then
local explosion =Instance.new("Explosion", game.Workspace)
explosion.Position = Vector3.new(0.661, 3.033, -1.616)
wait()
game.Workspace.button:Destroy()
game.Workspace.Part:Destroy()
game.Workspace.part:Destroy()
end
end
end)
this is the original code which i see now i shouldve made all the destroyed things into one variable, and taking all of the click stuff out of the playeradded function but it does do the same thing right
Nope.
You can't call Destroy() like that on the table there
where'd he do that
^^
oh the top one
what happens if i do that
Error
itll throw an error
how do i fix it + make it still clean
It'll say attempt to call nil value or something
tables are like containers, in fact you can kinda extrapolate tables to being everything.
its a list of stuff, you didnt put Destroy in it
so when you try to use it, itll error saying it couldnt find Destroy
but i cant make it just destroy all that?
you gotta do whats called a loop
this one is a for loop
for _, obj in (table) do
obj:Destroy()
end
itll go thru the table one thing at a table and run the code for each thing, assigning the variable obj in place for that thing at that place
ive never used for and whats the blank
the blank is the key the object is at in the table
you can make it a variable but since urs is an array its pointless, itll just be a number and not necessary to what ur doing
Lua/Luau is nice because the syntax is very english-like.
This is saying:
For each key/index (_) and value (obj) in this table (table) do YOUR CODE BLOCK
its funny because the original way was doing table.foreach lol
local button = {game.Workspace.button, game.Workspace.Part, game.Workspace.part
}
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("IntValue", player)
leaderstats.Name = "leaderstats"
local clicks = Instance.new("IntValue", leaderstats)
clicks.Name = "Clicks"
clicks.Value = 0
end)
game.Workspace.button.ClickDetector.MouseClick:Connect(function(player)
local clicks = player.leaderstats.clicks
while clicks.Value <= 25 do
wait()
if clicks.Value >= 25 then
local explosion =Instance.new("Explosion", game.Workspace)
explosion.Position = Vector3.new(0.661, 3.033, -1.616)
wait()
for _, obj in (table) do
obj:Destroy()
end
end
end
end)
ok so this is what i got right now
u cant just copy and paste homie
it dont know what (table) is that was a placeholder
u gotta put ur table there
for _, obj in button do
obj:Destroy()
end
ya
Roblox has documentation for a lot of the Luau syntax, here is the link for for-loops:
https://create.roblox.com/docs/luau/control-structures#for-loops
is that a good thing to do
like just go and look at the forum for lua and just learn stuff
Yeah
i didnt know if it was like too complicated or something
lol
if they like overcomplicated things
The Roblox documention is pretty good
Its not all that complex, they do a good job at giving examples and explaining things that are commonly used
yeah they dumb it down p well
even if sometimes theyre literally incorrect but
generally they fix it
You can fix it 
progress for my tween module for the math library... only 28 lines of code!!!!!
yo
also added camera shake n camera rotationsss
Its all open source, anyone can make a pull request to fix something that is incorrect. Pretty goated
can anyone help me make like money or something like how steal a brainrot does?
I have no idea what that is lol
u right cuz i cant even find it on their github
ive seen this before though
like ten years ago
does it have to do with the camera
could any1 help me
could anyone help me make a pick up system rq?
this is cold help not code do it for you
local EM = require(ReplicatedStorage.EasyMath.EasyMath)
local T = EM.Tween
local cam = workspace.CurrentCamera
local part = workspace.TweenPart
local s = part.Position + Vector3.new(0, 1, 0)
local e = part.Position + Vector3.new(0, 3, 0)
T:Hover(part, s, e, -1, 1)
T:Rotate(part, -1, 0.5)
task.delay(1, function()
T:CameraShake(cam, {
magnitude = 2,
roughness = 30,
rotation = 4,
fadeIn = 0.2,
fadeOut = 0.5,
duration = 2
})
end)
task.delay(2, function()
T:Move(part, Vector3.new(5, 0, 0), 1)
T:Scale(part, 1.5, 1)
end)
task.delay(3.5, function()
T:FadeOutTree(part, 2)
end)
task.delay(6, function()
T:FadeIn(part, 2)
end)
task.delay(7, function()
T:Rotate(cam, -1, 0.2)
end)
task.delay(8, function()
T:Move(cam, Vector3.new(0, 0, -5), 1)
end)
local ui = Players.LocalPlayer:WaitForChild("PlayerGui"):FindFirstChild("CommandUI")
if ui then
local f = ui:FindFirstChild("CommandFrame")
if f then
T:Rotate(f, -1, 1)
T:FadeInTree(f, 1)
end
end
bro what
thats brutal LMAO
hey so uh in the for loop the explosion just keeps exploding forever how do i fix that
not sure ngl
this does this:
-
Hover (infinite)
-
Rotate (infinite)
-
CameraShake (timed)
-
Moves
-
Scales
-
Fades out
-
Fades In
-
CameraRotates (infinite)
-
CameraMoves
-
UI Rotates (infinite)
-
UI Fades In
if clicks.Value >= 25 then
local explosion =Instance.new("Explosion", game.Workspace)
explosion.Position = Vector3.new(0.661, 3.033, -1.616)
wait()
for _, obj in button do
obj:Destroy()
end
print("boom")
end
horrors beyond comprehension rn
thats the code btw
how do i make it loop only once instead of over and over again
they dont its supposed to be a module inside of a library
ApplyToTree(method, ...properties)
i like this
yes
but wait
that lowk js makes it way more complicated n harder to read
chat how do i make this loop only once instead of over and over again
for _, obj in button do
obj:Destroy()
end
...
i havnt gotten that far yet
table.clear
it doesnt
the threads come from the module itself
thats js the test script
Only procedural effects create Heartbeat loops
and they disconnect respectively
oh yea whats the difference between wait() and task.wait()
yes i guess you are right
you should pull request the git
1.0.6 out as of
0.1 seconds ago
How do i get better at scripting(p.s ive been tryna script a door first person system and its pain) 🙏
seems more like ur usage of it
not the module
local button = {game.Workspace.button, game.Workspace.Part, game.Workspace.part
}
script.Parent.ClickDetector.MouseClick:Connect(function(player)
local clicks = player.leaderstats.Clicks
local explosions = 0
clicks.Value += 1
print("Clicked!")
while clicks.Value <= 25 do
task.wait()
if clicks.Value == 25 then
local explosion =Instance.new("Explosion", game.Workspace)
explosion.Position = Vector3.new(0.661, 3.033, -1.616)
print("boom")
for _, obj in button do
obj:Destroy()
break
end
end
end
end)
so how do i make the explosion stop exploding over and over again and just make it explode one time
many ways you need to find one that works for u
wdym
you guys are smart pls help
how do you pass highschool without being able to do this
whats the answer then
1 sec I am in ms paint
area of parallelogram is base times height
i can do it just cba
cuz u can just cut off the right part and put it on the left part and its a rectangle
its for a triangle m8
the formula you said
then use soh cah toa on the right triangle to find the angle
b x h divided by 2
its arcsin(area/(a*b)
thats not what were doing here
ik
we need to find the thetir
it says find tehta
but u ahve the area
theta isnt a right angle so
perpendicular to the 6.8 side
its 47.281
arcsin( 24.48/(6.8x4.9))
it says to 1 d.p
I'd imagine these exercises are meant to help ingrain these concepts into your head, no? Why else would you be doing them. Asking someone else for the answer defeats the purpose lol
p sure its arcsin not arccos
wait yeah mb
granted i just did that and it didnt work
its arcsin
no one does it
mb I am dumb
and its compulsory
anyways the reason I am in this channel
when i mean no one does it i mean like they dont like work it out just ai it
guys what is the best networking library
"our education and culture is going to shit so i might as well also go to shit"
there are so many like ByteNet, Zap, Blink etc. it's hard to choose
yk maybe the nukes are a good idea
I know there is no one size fits all but
you die aswell
And then when they get to a problem like that on a test or exam they're screwed.
certain have to be better under specific constraints
i mean
IT FINALLY WORKS
you guys really sounding like my parents huh
local button = {game.Workspace.button, game.Workspace.Part, game.Workspace.part
}
script.Parent.ClickDetector.MouseClick:Connect(function(player)
local clicks = player.leaderstats.Clicks
local explosions = 0
clicks.Value += 1
print("Clicked!")
while clicks.Value <= 25 do
task.wait()
if clicks.Value == 25 then
local explosion =Instance.new("Explosion", game.Workspace)
explosion.Position = Vector3.new(0.661, 3.033, -1.616)
print("boom")
for _, obj in button do
obj:Destroy()
end
break
end
end
end)
zap is p eazy, they are all comaparable in performance
Its just pointing out the obvious lmao
ok boss
rah
im stuck at a stalemate here cant do nun
hey dont run me
not my font, 0/10
not my font, 0/10
whys it look like that
Cross product foreshadowing
Try Jet Brains Mono
You can just use the fact the magnitude of the cross product is the area of a parallelogram
You know the adjacent sides, you know the area, you can use the formula Area = |a| |b| sin theta
Yessir
son so are we gonna keep gate keeping
I don't think it is possible in default chat window
except for emojis, you will have to create your own chat window
so i know it's possible
and i've seen dev forums on it i just don't understand it
Unicode Replacement Characters for Robux, Premium, and Verified! Hey everyone! I couldn’t find a solid list of these anywhere, so here are the Unicode replacement characters for Robux, Premium, and Verified symbols Unicode Characters Robux: Premium: Verified: In Code (Thanks @defnotazzurro!) utf8.char(0xE002) -- Robux utf8.cha...
im making custom characters/replication for my game and implemented resizable buffers 🥴
Yessir
Why
thanks
Np
im gonna be dispatching the server state to multiple clients via a buffer and when players leave, i also want the buffer to shrink to avoid wasting extra bytes
with 1 or 2 players it doesn't matter that much, but with 8+ it does
just went from this
local function jump1()
game.Workspace.obby.jumps.jump1.Anchored = false
game.Workspace.obby.jumps.jump1.Transparency = 0.5
end
game.Workspace.obby.jumps.jump1.Touched:Connect(jump1)
local function jump2()
game.Workspace.obby.jumps.jump2.Anchored = false
game.Workspace.obby.jumps.jump2.Transparency = 0.5
end
game.Workspace.obby.jumps.jump2.Touched:Connect(jump2)
local function jump3()
game.Workspace.obby.jumps.jump3.Anchored = false
game.Workspace.obby.jumps.jump3.Transparency = 0.5
end
game.Workspace.obby.jumps.jump3.Touched:Connect(jump3)
local function jump4()
game.Workspace.obby.jumps.jump4.Anchored = false
game.Workspace.obby.jumps.jump4.Transparency = 0.5
end
game.Workspace.obby.jumps.jump4.Touched:Connect(jump4)
to this
local jumps = {game.Workspace.obby.jumps.jump1,game.Workspace.obby.jumps.jump2,game.Workspace.obby.jumps.jump3,game.Workspace.obby.jumps.jump4}
for _, part in pairs(jumps) do
part.Touched:Connect(function(hit)
part.Anchored = false
part.Transparency = 0.5
end)
end
whos proud of me
Coolio 😎
Dawg 🥀
good job on finding out about for loops
yes very new
Same
nice! keep going, you will get better
Ty
yea i hope so that first script was horrendous
Type Error: (273,16) Expected this to be
'RBXScriptSignal' from 'Roblox'
but got
'RBXScriptSignal' from 'Roblox'

yessir
yea i defidently know what that means
trove:Connect(CollectionService:GetInstanceAddedSignal(Constants.OneWayPlatform.Tag), function(platform)
self:_onOneWayPlatformAdded(platform)
end)
Are there only 4 jumps? As in, are you changing them all?
my trove accepts rbx signals normally..
so basically if you touch one jump that jump falls into the lava
so it gets unanchored as your jumping to the next
and as you touch each one they get unanchored
impossible to help you if you dont provide pictures of ur code...its like asking someone to help you move some boxes but you don't actually show them the boxes
my bad, you did send it. was just hard to find
You could do
for _, part in pairs(workspace.obby.jumps:GetChildren()) do
end```
i have not used trove in a long time...
just switch that out for this part?
for _, part in pairs(jumps) do
part.Touched:Connect(function(hit)
end)
end
local types = require(script.types)
local Trove = {}
Trove.__index = Trove
-- Type exports
export type TroveT = types.Trove
--[[ -- TYPE DEFINITIONS
--_objects: {any},
--_cleaned: boolean,
---- Function type definitions
--Add: (self: Trove, object: any) -> (),
--Connect:(signal: {Connect: (any, (...any) -> ()) -> any}, handler: (...any) -> ()): any,
....
[...]
function Trove:Connect(signal: {Connect: (any, (...any) -> ()) -> any}, handler: (...any) -> ()): any
if self._cleaned then
return nil
end
local connection = signal:Connect(function(...)
if not self._cleaned then
handler(...)
end
end)
self:Add(connection)
return connection
end
[..]
Works like a charm.
Everytime i use it in a platform script for which the source code was refactored FROM ROBLOX. it compiles with type errors. it runs normally but i know that for some reasons types dont match exactly..
Yeah and you can remove the jumps table. Just switch out the stuff inside “pairs()”
ima format ur code better
local types = require(script.types)
local Trove = {}
Trove.__index = Trove
-- Type exports
export type TroveT = types.Trove
--TYPE DEFINITIONS
--_objects: {any},
--_cleaned: boolean,
---- Function type definitions
--Add: (self: Trove, object: any) -> (),
--Connect:(signal: {Connect: (any, (...any) -> ()) -> any}, handler: (...any) -> ()): any,
function Trove:Connect(signal: {Connect: (any, (...any) -> ()) -> any}, handler: (...any) -> ()): any
if self._cleaned then
return nil
end
local connection = signal:Connect(function(...)
if not self._cleaned then
handler(...)
end
end)
self:Add(connection)
return connection
end
now that it looks better ima take a look at it
when i do that the parts automatically all fall as soon as i load in
for _, part in pairs(workspace.obby.jumps:GetChildren()) do
part.Anchored = false
part.Transparency = 0.5
end
no, not quotations.
use `
the backtick key
beside the 1 button
.__tostring
you can do it!!!
Which metamethod do you think is useful?
all of them, it depends on what ur using em for
@thick loom remove the type casting from Trove:Connect
Yessir
Keep all the stuff inside the for loop that you had
if only, i in agurate (:>)
Trove doesnt compile with errors
never said it did. im just trying to figure out why it's giving out weird type errors
why am i getting errors for this code saying
"Humanoid is not a valid member of Accessory "Workspace.Xezls2Alt.Back""
"Humanoid is not a valid member of Accessory "Workspace.Xezls2Alt.Neck""
etc with all my accessories and hair
lava = script.Parent
lava.Touched:Connect(function(hit)
hit.Parent:FindFirstChild("Humanoid")
hit.Parent.Humanoid.Health = 0
end)
lava.CanCollide = false
lava.Anchored = true
but it works fine making me die
oh hey you finally did it!
do :WaitForChild
and also
because the touched event is firing for the accessories, you need to reference the character instead
instead of :FindFirstChild?
how do i do that
use hit:FindFirstAncestorOfClass("Model") to get the character
i think i spelt ancestor wrong...
yeah cuz it might not have loaded when the script fires, and also identify Humanoid first
how do you spell it again?
and use if hit.Parent == Humanoid then
ive used in a movement system + UI framework.. My PlatformServiceModule is acting up
-- Use Trove for cleanup management
local trove = self._trove
if not trove then return end
-- MOVING PLATFORMS: Connect CollectionService signals
trove:Connect(CollectionService:GetInstanceAddedSignal(Constants.MovingPlatform.Tag), function(platform)
self:_onMovingPlatformAdded(platform)
end)---Compiles with Type Error
trove:Connect(CollectionService:GetInstanceRemovedSignal(Constants.MovingPlatform.Tag), function(platform)
self:_onMovingPlatformRemoved(platform)
end)---Compiles with Type Error
-- Initialize existing moving platforms
for _, platform in CollectionService:GetTagged(Constants.MovingPlatform.Tag) do
self:_onMovingPlatformAdded(platform)
end
-- ONE-WAY PLATFORMS: Connect CollectionService signal
trove:Connect(CollectionService:GetInstanceAddedSignal(Constants.OneWayPlatform.Tag), function(platform)
self:_onOneWayPlatformAdded(platform)
end) ---Compiles with Type Error
And the type error is
Type Error: (259,16) Expected this to be
'RBXScriptSignal' from 'Roblox'
but got
'RBXScriptSignal' from 'Roblox'
????? liike what will happen if i use a custom signal...
script.Parent = Gay
```
im guessing 259 and 16 are line numbers, not sure though
can you put lines 259 and 16 here?
like this?
lava = script.Parent
lava.Touched:Connect(function(hit)
hit:FindFirstAncestorOfClass("Model")
hit.Parent.Humanoid.Health = 0
end)
lava.CanCollide = false
lava.Anchored = true
yes, except you need to put it in a variable. kinda like how you put lava = script.Parent
what is the goal of the script?
they are very new lol...
let me try
this one is to make the lava kill me which in this case is a part named lava but the errors keep telling me humanoid isnt a valid member of all of my accessories
ohh got u
oh nah
what variable
CollectionService:GetInstanceAddedSignal(Constants.MovingPlatform.Tag)
CollectionService:GetInstanceRemovedSignal(Constants.MovingPlatform.Tag)::RBXScriptSignal
CollectionService:GetInstanceAddedSignal(Constants.OneWayPlatform.Tag)
these lines :/
Type annotations dont eliminate the error either..
waddup
local lava = script.Parent
lava.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Humanoid.Health = 0
end
lava.CanCollide = false
lava.Anchored = true
end)
0 errors
does it work?
yes very well
oh nice
.
u didnt use local lava = script.Parent
holy how did i do that
yo i gotta be top 10 slowest scripter oat
audio spectrum analyzer in roblox studio 🥴
lava = script.Parent
lava.Touched:Connect(function(hit)
hit.Parent:FindFirstChild("Humanoid")
hit.Parent.Humanoid.Health = 0
end)
lava.CanCollide = false
lava.Anchored = true
this is the original code
hows that even possible gang
EditableImages
yeah
what deos that do
you can write raw binary data to it
can u like use it to animate ui?
oh nah
and depending on what you write, colors and shapes will show up in specific regions
not binary vro 💔
bro speaking the 101010100101
i hate it
lolz
guys
its in decimal so its not too bad
check out this cool ui
isn't tbat worse
you can even stream a youtube video to an editableimage with http
😭
call it whatever you want
look some cool tweens
thats wild
you called lava lava, so call character character
but like where do i put it and what do i make the variable equal to
inside the touched event
ive seen those before im literally so baffled i dont understand it
tweens are like the easiest thing vro
what the heck is a tween
u gotta watch brawldev 💔
lava = script.Parent
lava.Touched:Connect(function(hit)
local character = hit:FindFirstAnsectorOfClass("Model")
character.Humanoid.Health = 0
end)
lava.CanCollide = false
lava.Anchored = true
@somber imp
i only know thedevking fr
u didn't even use local
💔
blame him 🥴
oops
its okay guys
so how does local actually effect it tho
i remember back in 2021 i was trying to migrate data for a bunch of players
like what does it REALLY do
but i was a terrible scripter and ended up wiping everyone's data HAHAHAH
dang 😭
so uh
it's used to create variables
variables are basically used to name things
instead of saying script.Parent the whole time u can just say lava
the local keyword causes the variable to appear in the scope of the block that it's defined in
or whatever u named it
like u have to put local before functions too like
local function test()

nope
you dont have to
thats what ive been hearing
i don't think his gonna understand
you won't get runtime errors if you dont put local, but all ur variables will be accessible anywhere in the script, which might cause you to accidentally change them when you dont want to
they will be in the global scope rather than the local scope
you will get better at it
want some motivation?
in 2023 i landed a 53k robux commission
since then i haven't done commissions much. i should get back into them though
dangg
im just tryna sell ts ui 💔
i posted it on x

but I don't get much engagement w my posts
UDP protocol instead of TCP
what that
sends a request and doesnt wait for a response
networking protocols
oh
why wont it work this time chat
local switch = script.Parent
local clock = game.Lighting.TimeOfDay
switch.ClickDetector.MouseClick:Connect(function()
if clock == "00:00:00" then
clock = "14:00:00" else
clock = "00:00:00"
end
print("changed")
end)
is it useful tho
when you play overwatch, that's UDP, when you watch a youtube video, that's TCP
TCP = slow, UDP = fast
bro 💔
send me the
uh
items
on explorer
like screenshot it
ur editing the variable instead of the propery itself
you have to set game.Lighting.TimeOfDay directly
oh so u cant make a variable for that
if ur goal is to change the property, then no you can't
changing the variable will not change the property
so why cant u do it with that specifically
you have to do game.Lighting.TimeOfDay =
the variable reads the value of the property, and clones the value and stores it inside itself
changing the clone doesn't change the original
so this cant be changed either
local light = game.Workspace.lightswitch.body.pole.PointLight
.enabled
from true to false
yup, that's right. because ur storing the value inside a variable, which is nothing but a clone created from reading the property
--!strict
--!optimize 2
local switch = script.Parent ::ImageButton -- Whatever you use
local clock = game.Lighting.TimeOfDay
switch.ClickDetector.MouseClick:Connect(function()
if clock == "00:00:00" then
game.Lighting.TimeOfDay = "14:00:00" else
game.Lighting.TimeOfDay = "00:00:00"
end
print("changed")
end)
exactly, he gets it
local switch = script.Parent
local clickDetector = script.Parent:WaitForChild("ClickDetector")
if clickDetector then
clickDetector.MouseClick:Connect(function()
if game.Lighting.ClockTime == 0 then
game.Lighting.ClockTime = 14
else
game.Lighting.ClockTime = 0
end
end)
end
here bro
you can use to reference, but it changes the var
this is what i ended up getting
local switch = script.Parent
switch.ClickDetector.MouseClick:Connect(function()
if game.Lighting.TimeOfDay == "00:00:00" then
game.Lighting.TimeOfDay = "14:00:00" else
game.Lighting.TimeOfDay = "00:00:00"
end
print("changed")
end)
correct
@somber imp this works super well
lets goo
this will change the lighting property
lemme look
but if you ever want to keep a reference to the property's value, you can use a variable for that
you can read the value in the reference. you can also change the value in the reference and then set the property's value to the value of the reference.
this is how variables in lua work
so whats the point of this part
local clickDetector = script.Parent:WaitForChild("ClickDetector")
if clickDetector then
clickDetector.MouseClick:Connect(function()
btw im curious why are you optimizing
--!strict
--!optimize 2
local switch = script.Parent ::ImageButton -- Whatever you use
local clock = game.Lighting.TimeOfDay
switch.ClickDetector.MouseClick:Connect(function()
local clock == game.Workspace.lightswitch.body.pole.PointLight -- He can do that
if clock == "Brightness Thing" then
game.Lighting.TimeOfDay = "Brightness Thing 2" else
game.Lighting.TimeOfDay = "Brightness Thing"
end
print("changed")
end)
just to make sure the clickDetector has loaded in
not that its a bad thing, im just curious
rather than just switch.ClickDetector.Mouseclick:Connect(function()
used to it now ig. it doesnt change that much in general but its a bonus if you get it down over time
so like if the player loads in super fast with the script as normal it just wouldnt work
gotcha. if you want you can also use --!native to tell the compiler to compile directly to machine code rather than going through the Lua VM
yep
it just makes it so that it can never fail
not ready yet bruuhhh im sending variables of clocks still
C++ needs its own chapter
its nothing more than a comment 🥴
like --!optimize 2
does that apply for everything like if i load in before my clickdetector loads in for my door open/close button it just wont work at all
Ill go from Roblox games -> Blockchain development either way
yep
didnt even know that could happen
lol same
oh shit that's cool
i thought it just kept loading either way
blockchain dev?
until it started happening to testers
im 15 is ts possible or is ai gonna cook me
ive started coding while in active duty as a paratrooper, cause odds are were all cooked
every time
idek what i wanna do yet so hopefully im good
u got more time than me man stay focused stay hustlin
are you still a paratrooper?
that's sick as hell bruh
you gliding in the air?
man yall are making me feel bad ngl 😭 im a dishwasher
im gon be a waiter for summer bro, U know where da money @ >:P
i've been looking to quit that part time job for a while in favor of something more programming orientated
my dad and aunt is trying to hook me up with a a cryber crime opporunity at the government for the summer so hopefully that goes well
wish you the best of luck from the bottom of my heart man, cause we actually racing multi billion dollar companies for a slice of cake atp
meanwhile im trying to release this roblox game and promote the hell out of it
bro LITERALLY 💔
the money is good and all but i just wanna be able to have the freedom to do what i want like i used to when i was a kid 🥴
valid af guys, we all seen what Escape Tsunamis and Brainrots for at Q4
yup....
so based off this is there any way to make this better
local switch = script.Parent
switch.ClickDetector.MouseClick:Connect(function()
if game.Workspace.lightswitch.light.pole.PointLight.Enabled == true then
game.Workspace.lightswitch.light.pole.PointLight.Enabled = false else
game.Workspace.lightswitch.light.pole.PointLight.Enabled = true
end
end)
Steal a Brainrot because the most popular game IN GAMING HISTORY
im trying to set up something i enjoy spending much of time at, wish you wont see it but military camps aint the most jolliest of enviroments
breh 300M$
thats an average GDP of a country or smt
small country but still..
i can imagine that
you can put PointLight.Enabled in a variable and then change the variable. then when you wanna change the property itself, set the property to the variable. that's one way to make it neat
ewwww ai 🤮
literally just .Enabled = variable
learn to code
fair
pffft
yea i wouldnt have even thought to do that
thanks tho it looks so much better and works
oh wait now it doesnt
can someone tell me the error
i prolly did something hold on
me love buffers
@plush zenith help
🥺
btw i can't join vc cause i got vc muted a long time ago for some bullshit and they never unmuted me 🥴
that's why im only talking in here
I'm surprised I never got VC muted
permenantly
I was doin a lot of stupid shit a few years ago
I feel like you'd scream out the n word and call everyone a g oy
nah
I would spam leave and join

good
any way i can make this cleaner?
local button = {game.Workspace.explodingbutton, game.Workspace.wedge, game.Workspace.body
}
game.Workspace.button.ClickDetector.MouseClick:Connect(function(player)
local clicks = player.leaderstats.Clicks
clicks.Value += 1
print("Clicked!")
while clicks.Value <= 25 do
task.wait()
if clicks.Value == 25 then
local explosion =Instance.new("Explosion", game.Workspace)
explosion.Position = Vector3.new(8.981, 3.033, -26.255)
print("boom")
for _, obj in button do
obj:Destroy()
end
break
end
end
end)
why do you have an unused variable
where
explosions
oh yea forgot to delete that
don't use loops inside of an event
i was trying to make it stop exploding over and over again and just do it once with some weird way that i quickly realized was dumb and the break was actually just in the wrong spot
I don't suggest it
whats wrong with it
you can do it but if it's a really big script, you can get off path and have more while loops inside of events and when you expect one to work, it doesn't
because it has to keep checking if the player is at 25 clicks or not
and also has to destroy the entire table in the for loop
put the loop outside so you can manage other conditions in it and not only for one event
put the loop outside
and you don't need a loop
just the conditional statement inside of the event is enough
so how should i write it
like 4 variables on the outside and just destroy all 4 on the inside
instead of a table and a for loop?
No, I was talking about the while loop
oh so the for loops fine
remove the while loop
you don't require it
there might be a logical error in your script
It will delete the buttons for client-side only
not for entire server
just remove the red lines and you're good to go
hows it work
dm me
@somber imp are u new to scripting
Does anybody know how to make a match system?
yea
im just getting into this
what are you using for learning
im trying to figure out how to make my code cleaner and work better
i was watching youtube stuff but right now im asking around as im trying to make things
do you want some tips
sure
when you finish writing a code,
- try to use less variables i.e not a lot of Boolean or data variables which aren't addresses of instances.
- try shortening your statements as much as possible
- have error handling statements i.e if something goes wrong, it will print in the output
- make your logic easy i.e not a lot of nested statements, unnecessary Boolean conditions.
- know the basics i.e having loops outside of events, not defining a function in middle of script but at the very top, good naming of variables of functions, keeping a systematic way of creating variables, functions and running loops i.e have first four lines for services such as useinputservice, replicatedstorage and the next 4 lines can be locations for instances.
- don't be afraid to add comments but don't overuse it.
- before you start mathematical operations, have a dry run done
- scan for all the three types of errors by dry running i.e logical, syntax and runtime error
gonna keep this thank you so much
no problem
quick question how do you dry run i.e logical error
hmm
understand your objective
an example of logical error would be
let's say you want to create a part instance for all the players so you have to use the script
but you use the localscript and place it in starterplayer
that's a logical error
yea because thats just client right
another one would be dividing any number by 0
yes
isnt dividing by 0 just 1
shortening statements depend on the script type tho, if its some script thats gonna be used once in lifetime, then u can keep ur statements short, but if its a production script then its better to keep every variable, statement and comment as full as possible so u wont get to read brainfuck code
ye i do
or is it 0
or let's say you were supposed to return an array at the end of function but by mistake, you return an int number
dividing by 0 is always 0
so just tiny mistakes
rookie mistakes
that's true but I wouldn't suggest anyone to use a lot of nested statements because if you were to debug a mistake, it will take you sometime to actually understand the steps and conditions you've returned i.e dry running
isn't that the reason why u make warn() or print() statements in each function or var change so u can see where it fails?
mistakes that don't cause the compiler to stop running the script but are from the user side
yeah I've said this point
3 ^
u also don't make error handling everywhere, sometimes u can do it without error handling
yes
if ur script is reliable on error handling then ur script is an error
youre right
is this like a polite argument
it's not an argument
debate
he's just saying things which I've stated above
no
not a debate either
its just an ensurement thing
yes
like a comment
it's undefined
(search up the graph of 1/x and you'll see why)
💀
u can divide 0 by things and its just 0
but u cant divide things by 0
uhm so
Uhm... Ignoring code help for now, I'm not sure how to make a customization menu like wcue, lt:r, and felandia has, does anyone know how to do this and can help me out?....
- wont agree with that, its more performant to localize table field if you access field value 2 times (read), instead of table.value everywhere do local value = table.value, and use local, local lookup is alot faster then table one
- is situational, if you talk about fast leave logic like if value == nil then return; end; but if its 2 or more statement then its not reccomended cause it makes readability awful
how long until creator rewards starts coming in?
yall suck
what I meant was for Boolean values such as
local IsOpened = false
local Opened = false
Both the variables may have the same functionality for acting as the conditions for statements which is unnecessary. I did not mean for any sort of variable function such as table.value and whatsoever.
yes, youre right
but that doesn't mean you have 100 nested statements for a function which spawns an instance part in the workspace
i mean anything over 3 nested statements is bad
yes
there is some edge cases like hotpath with optimisation but thats rare
where you can use more then that
youre right
tldr yall suck
bro didnt get the joke
should i call doctor for you?
whats a doctor
you cant use discrod if youre younger then 13 you know?
86 days < 13 years, leave kid
86 decades*
task.spawn() runs instantly whereas task.delay allows you to delay the code by adding in an int argument
i am about performence and how newbies use it
hm
depends on what u want to do
luau and performance in the same sentence
people before --!native existed
all my homies hate native
lets say coin despawns after 5 seconds after spawning
do you even understand what it is dude?
whos dude
ok NOODLE sir
Do you even know what is this? (may have some syntax issue)
type function union(type1: type, type2: type): type
return types.unionof(type1, type2);
end;
you can go ragebait on your tik tok, that doesnt work on me
@real karma
like2dev what does the code in that file do
do not work
with not closed parethesis i dont think so
lua says it runs
we talk about Luau
