#code-discussion
1 messages · Page 304 of 1
but if the code is tested and seems functional in production, I should go for it regardless right?
okay! appreciate the tips a lot thank you :)
When I used --!native it cut the time of math.sqrt / n^0.5 operations in half
I haven't seen any performance gain from --!optimise
It just makes debugging harder
that's actually pretty insane
native just runs the code natively there's nothing crazy stop the glaze
hows it glaze he prolly tested it ig
I benchmarked it
with 10,000,000 iterations
weird thing is that math.sqrt and n^0.5 got the exact same time almost every time
iirc i found out during my tests that math.pow is unbelievably slow compared do doing n^2
idk why
n^2 has a shortcut in the interpreter, that's why
n^0.5 does too
who cares about time complexity
wdym wrap it in a function? what would the wrapper look like
just add a ton of for loops and forget about it
local function pow(n) return n^2 end
real chads have O(n!)
doesnt that just add a function call overhead tho
lmao
there’s always that one guy in every field who will make some knowledge that’s basically completely useless and maybe 10 guys use it in the future at best
🙏🙏🙏
Albert einstein
Albert and Einstien
nah he’s diff cause he actually made something insanely useful
And bro dedicated his life to it too
math.pow is so fucking slow
bro set the goal when he was 12 got it done after the phd
Wrapping it in a function is much faster
fractionally but still faster
that's weird as hell but im ngl the gain is so marginal that i dont know if this is even intended lmao
holdon
n*n is faster than all
n*n wrapped in a function is fastest
" 00:54:27.330 Without function : 23.313100000450504 - Serveur - Script:5
00:54:27.353 With function :23.56809999946563 - Serveur - Script:15"
Here's with --!native
n^2 beats n*n in native
with function is slower lmao
Try this
local mathpow = math.pow
local function pow(n: number): number return n^2 end
local function pow2(n: number): number return n*n end
local iters = 10_000_000
local sink1 = 0
local sink2 = 0
local sink3 = 0
local sink4 = 0
local sink5 = 0
local start1 = os.clock()
for i=1, iters do
sink1 += mathpow(i, 2)
end
local end1 = os.clock()
local start2 = os.clock()
for i=1, iters do
sink2 += pow(i)
end
local end2 = os.clock()
local start3 = os.clock()
for i=1, iters do
sink3 += i^2
end
local end3 = os.clock()
local start4 = os.clock()
for i=1, iters do
sink4 += pow2(i)
end
local end4 = os.clock()
local start5 = os.clock()
for i=1, iters do
sink5 += i*i
end
local end5 = os.clock()
print("math.pow: " .. end1 - start1)
print("n^2 (function): " .. end2 - start2)
print("n^2 (plain): " .. end3 - start3)
print("n*n (function): " .. end4 - start4)
print("n*n (plain): " .. end5 - start5)
thats because a multiplication is faster than n^2 but that only applies to powers of 2, obv if u need huge powers ur not gonna do n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n
n^2 is fastest in native
oh you do a +=
i js do local a = 2^2 lmao
local function Square()
return 2^2
end
local Clock = os.clock()
for i = 1,10000000 do
local a = 2^2
end
print("Without function : "..tostring((os.clock()-Clock)*1000))
local Clock = os.clock()
for i = 1,10000000 do
local a = Square()
end
print("With function :" .. tostring((os.clock()-Clock)*1000))
personally i js have that
I guess you can do that but it doesn't show the full picture
holdon let me try with ur specific things
00:58:24.428 Without function : 30.420799999774317 - Serveur - Script:9
00:58:24.459 With function :30.65449999849079 - Serveur - Script:15
local function Square(i)
return i^2
end
local Clock = os.clock()
for i = 1,10000000 do
local a = i^2
end
print("Without function : "..tostring((os.clock()-Clock)*1000))
local Clock = os.clock()
for i = 1,10000000 do
local a = Square(i)
end
print("With function :" .. tostring((os.clock()-Clock)*1000))
You're meant to stop the clock before printing
overhead still makes the function take longer
oh?
oh i never thought of that actually
print literally adds to the benchmark, making it void
i forgot print would add some time lmao
well the add should be constant given the nature of the print but holdon ur right
os.clock() also adds some time, if you want most precise, cache os.clock into a local
00:59:37.392 Without function : 30.550299999958952 - Serveur - Script:10
00:59:37.423 With function :30.90920000067854 - Serveur - Script:17
local function Square(i)
return i^2
end
local Clock = os.clock()
for i = 1,10000000 do
local a = i^2
end
local End = os.clock()
print("Without function : "..tostring(End-Clock)*1000)
local Clock = os.clock()
for i = 1,10000000 do
local a = Square(i)
end
local End = os.clock()
print("With function :" .. tostring(End-Clock)*1000)
still the same idea
that wouldnt change the final results, accessing os.clock virtually takes like one microsecond top
i get the idea for precision but that's pointless for this test since a benchmark with an accuracy of 1/100s would already be much more than enough
also i'm not even sure if it adds some time at all since according to you this is compiled and then interpreted, os.clock must have it's own bytecode and setting a variable to os.clock virtually changes nothing to that
Only one way to find out
benchmark os.clock
like, if os.clock compiles to 0F FF FF FF idk, doing local Clock = os.clock is still gonna compile to 0F FF FF FF
if anything it adds the overhead of a variable but thats not rlly anything crazy
wait nvm it does add overhead lmfao
Doesn't os.clock use windows as a layer to talk to find out how long it has been up?
i'm ngl i have absolutely 0 clue about how it works behind the bars
i'm sure its a bit more complex than that tho since it also works on phones and such
it's probably a more generalistic wrapper
n^2 (function wrapped) wins majority of the time
With native math.pow finally catches up a bit
i'm really not sure how come it's winning for you, for me the function is clearly losing and that seems like the logical result
send ur code again rq
local mathpow = math.pow
local function pow(n: number): number return n^2 end
local function pow2(n: number): number return n*n end
local clock = os.clock
local iters = 10_000_000
local start1 = clock()
for i=1, iters do
local a = mathpow(i, 2)
end
local end1 = clock()
local start2 = clock()
for i=1, iters do
local a = pow(i)
end
local end2 = clock()
local start3 = clock()
for i=1, iters do
local a = i^2
end
local end3 = clock()
local start4 = clock()
for i=1, iters do
local a = pow2(i)
end
local end4 = clock()
local start5 = clock()
for i=1, iters do
local a = i*i
end
local end5 = clock()
print("math.pow: " .. end1 - start1)
print("n^2 (function): " .. end2 - start2)
print("n^2 (plain): " .. end3 - start3)
print("n*n (function): " .. end4 - start4)
print("n*n (plain): " .. end5 - start5)
paste this in the command bar
and open the output
" 01:04:58.216 n^2 (function): 0.029117499998392304 - Modifier
01:04:58.216 n^2 (plain): 0.029091499998685322 - Modifier"
well LMAO
maybe i'm ngl, that's really weird
i get the same results when launching it in a script, function loses by ab it
Weird
WELL wtv, computer science what can I say
ima go back to my stuff i need to focus a bit before i go sleep, goodnight brother
gn
that's noise
Roblox will inline loca functions
meaning
local function x()
print(1)
end
x()
just becomea
print(1)
if you give it a variable it will still inline it
the only case is if it's var args
inlining is directly giving the assembly to the cpu instead of the function overhead right
no it means the bytecode
is gonna be directly injected to where the function call is
instead of a function cl
oh right mb i defined it wrongly
thats what i meant tho js the binary not the assembly lmao
It's still faster tho
not all
or only appropriate oneqs
small ones
how is it noise
oh okay lmfao
because they have the same exact instructions
holdon i can js
If it was noise it'd be varied results
But it's pretty much always faster
01 10 33.141 Time for 1 : 21.297299999787356 - Serveur - Script:7
01 10 33.163 Time for 2 : 21.687100001145154 - Serveur - Script:7
01 10 33.185 Time for 3 : 21.41000000119675 - Serveur - Script:7
01 10 33.205 Time for 4 : 20.56050000101095 - Serveur - Script:7
01 10 33.226 Time for 5 : 20.351300001493655 - Serveur - Script:7
for i = 1,5 do
local Clock = os.clock()
for i = 1, 10000000 do
local a = i
end
local End = os.clock()
print("Time for "..tostring(i).." : "..tostring((End-Clock)*1000))
end
ok i cant get rid of the stupid 10 but here
they have the same exact instructions
wtf you have access to the actual assembly??
thats bytecode
isnt bytecode just assembly but unreadable
no
and vice versa assembly is js the readable version of bytecode
asm is machine code
bytecode is similar to asm as its an instruction but its instructions for the interpreter
ohhh
asm is instructions for the machine
I ran it 10 times
luau compiles to bytecode then if native is enabled the bytecode is compiled to machine
okay okay okay
and how do you have access to the bytecode? is this a website or smth?
its a website
and luau provides tools
to read it
Analyze & explore the intricate details of Luau's compiler. Currently supporting 192 versions of Luau: 0.501-0.698.
Luau Playground - Run Luau code in your browser
yep that's perfect tysm!
I swapped the order
its the same instructions
what you are seeing is just noise
i mean notice how here it seemed to take less and less time
no idea why but
you are just benching how long a loop runs
isnt that kinda the goal here
to just bench a loop and see which loop took longer
the local a = i does nothing
ohh no i know but i meant when benchmarking something small overall
Doesn't that get optimized away?
yeah
oh yeah ziffix wdyt of my online compiler for roblox
anybody tryna test a system w me?
Background applications
Or other scripts if you are playing the game with Client instead of running it as a server
The noise could be due to loading
it was just to prove a point to someone dw i know
noise always happens in computer science
and in every science actually
lmao
Yh but if you in theory stop all other process, it will give you the same value everytime
nope
even if you stop every single process and magically isolate every single thing, the electricity will still travel at slightly different speeds, particle alignement inside the computer will change, etc etc
physics are random by definition, so computer science will be too
That in avg will be the same tho
in a perfect world the average will indeed converge to the same when you go to infinity, but from a case-by-case basis it will never ever be the same value
well it could, but the probability is like 1 in god knows how many lmao
how do i improve more on scripting bruh
make small game
I am trying to learn scripting/coding for years now... anyone got any tips for a beginner?
Don't use AI at the starting.
Thats what i started with lol
what am i seeing 😭
It's stop you from building logic, coding is mostly about logic.
Feels like a python developer created a calculator.
im starting scripting but if u start with ai u will rely on it to much so u wont be able to script on ur own that good
pro tip: anchor your scripts
How you do that?
Pro tip: always test your script.
smart just watch brawldevs tut on scripting there good
pro tip: set the brick color on your scripts to white
How did you guys learn scripting?
bro its the same with everthing just practice i started like 2 days ago
I started 2 years ago and it still feels like i am a newbie at it
Pro tip: Don’t trust the clien never put important game logic or security checks in LocalScripts.
let me guess u thought u were good at scripting so u stopped practice
NOPE, its the exact opposite I never really understood how to get good at it
its called laziness
just code sum light
‘’’
if player is hacking = ban
give me 1000 robux
create fun game : execute()
add money
publish()
‘’’
well thats prob why 😭 brawldev has a tut list for advanced stuff idk if that could help
i guess bro
Thats what chatgpt told me lol
like i guess
why u asking ai 😭 🙏
It's helpful man
idk but im a animatior tryna learn scripting but ive never liked the use of ai
Oh, that's why.
wym 😭
Thats one person I saw in 2 years of AI existance that doesn't like it
No offense I have some animator freinds scripting feels hard to them.
well yea its a whole new thing to learn
Use AI but not at the starting because at this time you are just a beginner and need to build foundation of logics if you skipped this part what code AI wrote you can't figure/understand and AI can't do complex coding therefore this is the limiting factor for people who are using AI at the starting.
no one likes ai bro only you 😭 and maybe to ask question but not to do full on scripts
Not sure of i can agree with that
I just saw my friend created a fps combat game using AI in studio within 5 min I was like Ahhh.
How’s this look so far
yea but if it gets bugs u wont know how fix cuz u rely on ai
Yeah.
True
make it like brawlhalla
Dawg BRAWLHALLA?
Who thinks of a game like that and thinks BRAWLHALLA
make people ANGRY
You saying BRAWLHALLA made me angry
well u could do smash bros but u dont want suied so
Well I just wanna make the system and somehow sell it
i have NO IDEA how to make that im new at scripting
2K and it’s all yours
im broke thats why im tryna learn scripting i started 2 days ago
Well damn
Does stuff like that actually sell for 2k?
Dude anything can sell
It’s the system itself
Alr I am asking ChatGPT for a Tutorial on what ever you made
Go ahead
Should be a good way to learn right?
a
I started learning lua few days ago, now I can write such codes with little bit of difficulty, I want to know is my code okay as a beginner?
local mainGame = game.Workspace:WaitForChild("MainGame")
local plate1 = mainGame.Plates:WaitForChild("Plate1")
local plate2 = mainGame.Plates:WaitForChild("Plate2")
local plate3 = mainGame.Plates:WaitForChild("Plate3")
local plates = mainGame.Plates:GetChildren()
local playerToPlates = {}
for _, plate in ipairs(plates) do
plate.Touched:Connect(function(otherPart)
local character = otherPart.Parent
if not character then return end
local humanoid = character:FindFirstChild("Humanoid")
if humanoid then
local player = game.Players:GetPlayerFromCharacter(character)
if player then
playerToPlates[player] = plate
end
end
end)
end
while true do
local safePlate = plates[math.random(1, #plates)]
task.wait(10)
for _, player in ipairs(game.Players:GetPlayers()) do
local character = player.Character
if character then
local humanoid = character:FindFirstChild("Humanoid")
if humanoid then
if playerToPlates[player] ~= safePlate then
humanoid.Health = 0
end
end
end
end
end
Its Hella simple what are you tryna get us to say exactly
Just wanna opinions if I am on right direction or not
Uhhh ig so, also just dont bother using pairs and ipairs
Okay
Id say your logic is a bit too extended, and you should use inverted ifs to shorten your code and indentation
I.e. player in your touched function is just
game.Players:GetPlayerFromCharacter(hit.parent)
You dont need to search for character and humanoid
And you can do inverted if like so
if not player then return end
Got it, thanks for the advice 👍
very good. why do you need to reference plate1, plate2, plate3 in the first place.
Yeah I just noticed that too i removed that part now
That reference was useless i removed it
and its very good, you made sure you check the model if its a actual character, not just a model
At first i thought i would use it somehow but at the end i end up using loops
Thanks
ain't no way no one typed anything in 40 mins
Can someone help me with a InventoryUI? So when I equip a tool it goes into my backpack even though I have a script preventing it from going inside of my backpack for my InventoryUI and when I try to unequip it, it just's equips again.
video please
Can't post video here.
dms ❤️
hi guys, im trying to make this like bot, it posts an embed with a button, when u press the button it should show the next embed as ephermal, for some reason tho it's not working, the buttons don't work and i'm getting "unkown interaction", anyone know how to fix it?
Try using a server with real programmers, pretty sure that'll get you better answers
lmao
Sounds like a server-client communication issue to me.
Can do any script, you can pay me after completing or we use mm ( I’m not going first unless you are trusted)
brother the message below you
Respectfully im stealing this gif
💀
If total force is the same as extra force itll pass
Unless your variables are wrong that isnt how it should sork
his logic just doesnt work and not good
Does anyone have a good advice how to make own economy system in robloxstudio?
Economy like how
just money?
that's too vague
? bit vague
I mean how to use AnalyticsService or rather good analytic system
economy and analytics are very different
I find it myself out
guys im finding ppl to help me build my game, and potentially build a dev group. dm meeee
"help me build my game" 🤡
"Guys i want unpaid labor and potentially a whole group of people who work for free YOU message me"
"people who take % pls dm me"
I just scripted this wheat system (32 lines of code), what do yall think
can you show your code?
WHO NEEDS SCRIPTER TO MAKE MENUS OR SHOP GUI AND OTHER ESSENTIAL STUFF
dms
whats better manual coding or using agents
yea connect studio to vs code and rojo
and codex
the problem i face with agents is that they create instances for explorer this makes it very messy
a mix of both is the most efficient route
though i personally prefer writing code myself, i don't use ai to directly code very often
pretty sure agents rn r not very advanced and can only be used to make slop like brainrot
but you shouldnt really just let ai code for you (aka vibe coding), you should use it to assist you instead
they are quite capable
just tend to make mistakes and write worse code than a knowledgable human would
it can point out problems you might not have noticed, help you understand topics you don't understand, write tedious code like data sets, etc
when it comes to debugging though, make sure you actually know what it's talking about and what you want
sometimes what it points out isnt unintentional
Ive made the mistake of using ai for my code and trust me it gets really bad, and if u ever want to add features its gonna be hard because the ai code
I have completely restarted my game due to this
anyone know a scripter who sells tycoon kits
progress on that project, made some cool designs and yeah working on the core gameplay rn
how do you genuinely start learning luau
i do NOT want youtube tutorials those suck for me
yt tutorials work for me
dev forum and roblox official docs could also help
whenever i try tutorials i forget everything after and stall
Anyone here want to make a slop game?
im a beginner scripter can i have some help fixing this script i want to do when touched death then colour changes random
this is it
local Death = workspace.DEATH
local rng = Random.new(.Color3.fromRGB(rng:NextInteger(0,255),rng:NextInteger(0,255),rng:NextInteger(0,255))
)
Death.parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent:BreakJoints()
end
end)
its not working i need help debugging
nvm fixed
where did u get this from 😦
wow
i made it
nope ur on ur own
local Death = workspace.DEATH
local rng = Random.new(.Color3.fromRGB(rng:NextInteger(0,255),rng:NextInteger(0,255),rng:NextInteger(0,255)))
Death.parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Humanoid.Health = 0
Death.Color = Color3.new(math.random(),math.random(),math.random())
end
end)
smthing like this will work
replace "Death.Color" with something like "workspace.Part.Color" or smthin
Do tycoon games go viral?
sometimes
CAN I GET SME HELP
im stuck rn
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder", player)
leaderstats.Name = 'leaderstats'
local Points = Instance.new("IntValue", leaderstats)
Points.name = 'Points'
local xp = Instance.new("IntValue", leaderstats)
xp.name = 'xp'
end)
okay so what's th eissue?
what's the issue..?
itrs not working
Is there's some sort of free Mentorship
I think it's lacking an int value
lemme check my proj rq
ye i think it is
What are yall thoughts on vibe coding?
whats that 😭
Using ai to help you with coding
I'm also still learning so correct me if im wrong. This is my example:
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local money = Instance.new("IntValue")
money.Name = "Money"
money.Value = 50
money.Parent = leaderstats
end)
in this case, i think you should try adding an int value = 0
i think name should be with capital N
local leaderstats = Instance.new("Folder", player)
leaderstats.Name = 'leaderstats'
local Points = Instance.new("IntValue", leaderstats)
Points.Name = 'Points'
local xp = Instance.new("IntValue", leaderstats)
xp.Name = 'xp'
end)```
cause im watching dev king because hes teachhing
I learnt mine (still learning) from BrawlDev
yea i finshed watching him
then surely u must've watched about "playerstats"
Also it better to do the parenting after like this local Points = Instance.new("IntValue") Points.Parent = leaderstats Points.Name = 'Points'
^
Yea I also recommend it. At the very least, It helps me know what values are and which instance is rooted this from
anyone got something i should try making im maybe intermediate started 2 weeks ago
horrible if you dont know the basic
why add more lines if you could just parent it instantly with the function
instance.Parent is old way and kinda fills your codes
can u give me an example?
local Points = Instance.new("IntValue",leaderstats)
Points.Name = 'Points'
Can anyone make a game with me
What's the structure for the arguments? Are there more like (datatype, parent, ???,???)
yeah
(objecttypes,parent)
could cause some timing issues is what some have told me but i could be wrong
For names and values, you'll manually need to assign it right or define
But what if you know the basics and more and can code?
yeah
you need to assign it manual
ok ive learned something new. tysm
use it but minimally since you need to learn and stuffs
btw, was I correct about giving them an intvalue first so that it will pop out on leaderstats or it can automatically display something without initializing int values?
yes as long its in leaderstats folder then it will show
local Death = workspace.DEATH
local rng = Random.new(os.clock())
local rngcolor = Color3.fromRGB(rng:NextInteger(0,255),rng:NextInteger(0,255),rng:NextInteger(0,255))
Death.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
if humanoid then
humanoid:TakeDamage(humanoid.Health)
Death.Color = rngcolor
end
end)
random.new() is a seed
ohhhhhhhhhhhhhhhhhh
Did anyone find a way to fix or bypass the Sky Destroyer AXEzz script issue
is it possible to do this guys
Player joins my game
They get teleported to another experience I don’t own
I want control over which exact server they join (not random matchmaking)
Isn't the roblox ai nice to scripting
With const existing now, should we do const function functionname() end or local function functionname() end
I think that u should use
local model = hit:FindFirstChildOfClass("model")
if not model then return end
local humanoid = model.Humanoid
if not humanoid then return end
😭
you dont need to verify if its a model
since anything that have humanoid will get killed
does anyone here knows how to find a jobid?
game.JobId
is it dangerous to have a dataservice (the one from leif(youtube)) in replicated storage, it has client and server version but exploiter can get acces to it if everything is avaible for clientit right?
i got recommended to make a discord acc and join this server how do i get image permissions
ReplicatedStorage got access to client so yeah
but why do all tutorials have everything in replicated storage, its one of the most advanced profilestore wrappers i've ever seen, he cant be that stupid to put it in replicated storage
script that handle datastore always in serverscriptservice
he is just showing example and not for production use btw
but it also has a client networker and dataservice
local server = require(script.DataServiceServer)
local client = require(script.DataServiceClient)
export type Server = server.DataServiceServer
export type Client = client.DataServiceClient
return {
server = server,
client = client,
}
why client need datastore access??
can i find the jobid of a certain game even tho i dont own it?
Just make everything on your own after seeing the tutorial usage
"get access to it" is only true in the sense that clients can see the module's code. however... that is a complete non issue in this case since the code is already available online and open source
if you are worried about clients being able to "peek into the server code and freely change anything," then dont worry: that is simply not possible
module scripts must be required from either the client or server. when they are required, they exist only in that context. for example, the server gets their own server-sided version of the module. the client CANNOT see any mutated data inside of this server version
dataservice is perfectly fine
if you really dont want the server side to exist in replicatedstorage, thats also perfectly fine
you can simply move it to serverscriptservice, then tweak anything that is required
actually unsure
with exploits you could probably get the jobid of a server you are in
so i can let it stay in replicated storage
can i dm you
btw ngl client for datastore fetching is weird
it doesnt actually touch datastoreservice, i dont believe
it is solely for client replication of server data
can you write me a line of code that does that i just need it so i can rejoin the same server
if it is relating to a game you dont have ownership of, then i wont
sure
are u sure, chatgpt says the completely opposite
the only "security risk" is the fact that the client can see the code, which is not an issue at all. for example, ProfileStore itself is completely open source. anybody can see the code
same logic here
replicatedstorage is as secure as the script you have
chatgpt struggles in many capacities. dont take everything it says at face value
make sure to actually verify remote and stuff in replicatedstorage
let me show you an example rq
true AI is just text prediction algorithm
i already moved my module loader into 2 versions, client verison and server version
does not replicate between server and client or vice versa
you can have a single module loader in replicatedstorage unless their logic differs in some capacity that constitutes separating the scripts
for stuff liek dataServer:getChangedSignal("currency") for guis as example
i believe he misunderstood what the dataservice client side was doing. its all g
is scripting the best way to go?
it just creates a client sided copy of the data that is automatically replicated to and can be reacted to
preference
i mean if there is array inside the module then its alright
why cant u just fire a remote event from server to make change instead of listening from the client
i thought it was directly grabbing the data from datastore 😭
manually firing remotes for every insignificant data change gets extremely tedious and frustrating. thats actually one of the primary points that motivates datastore. rather than wiring all these remotes, you just listen via a signal
i mean, it is needed for everything so ig it is the one that gives the most and has a higher demand
remotevent takes server resource
which suck
i have more client stuff in the dataservice , so it wouldnt make sense to make a remoteevent for that, i would have to fire it everytime sth changes , this is specific for "currency"
yeah. its generally the highest yield skill, but its not generally the "best." but if you learn it to a high level, you will typically see much higher payoff than other skills
there is bridge module and stuff to do data transfer and not using remoteevent
its negligible in this case
ig u have experience in it, u sound like u do
youre paying a slight bit of bandwidth usage for extreme ease of use. you could even further decrease this by:
- (unsure if leif's dataservice has this) preventing automatic server -> client replication of some paths
- use a networking module to compress the payload massively
if you do it as a hobby then sure
i got a decent amount of experience
networking module is underrated
im actually looking to monetize it someway
scripting will get you the most job offers and such
if you are willing to put in some time to learn scripting, thatll be your way to go
do you make ur own?
fr
well im actually going to study software engineering so ig i have to lol
then for sure, go for it
Nah.. cause iam lazy but 5uphi Packet Module is good
should i start with lua tho? that way i can sell things from roblox in the future?
lua is good for beginners
yh but also learn some stuff outside of roblox studio
just be aware that even though scripting on roblox is advertised in this "beginner level thumb sucking coding" package, there is a ton of complexity to it as you get deeper. but it is super easy to get into
just basic programming skills
packet is a great module
aight tysm
i was also learning vfx, yall suggest to do both at the same time? or just focus on scripting
you really dont need to create your own networking module unless you are running into a serious bottleneck or you just like recreating the wheel, which is also fine
lua got easy syntax than other languange
vfx actually requires a good amount of scripting, usually
I just wanna learn and understand it more
frontend scripting, at least
python is easy once you got more into lua
if i cant then oh well
to animate some more complex parts of vfx
but ill try atleast
then yeah, totally fine to dip your feet into it
it really isnt that hard to create a basic networking module with buffer serialization and deserialization
scripting and vfx kinda interconnect with each other if the vfx get more advanced
yeah i did like some auras and explosions, it looked kinda good actually, so ill just learn scripting
its perfect then
its so simple that you can probably learn most of the implementation from the docs alone
https://create.roblox.com/docs/reference/engine/libraries/buffer
yeah
if you plan to make any kind of "moving" vfx, you will need scripting. for explosions and auras, thats usually just raw vfx unless it gets complex
let me try and show an example of vfx thatd require scripting if i can find some on twitter rq
yeah i want to make those
or actually i can js check syntax's work. hes goated
if you also have any curved projectiles or such, thats scripting
yeah i want to make those
ill just watch some tutorials on yt for it ig and start messing around
ty yall
for sure. good luck man
gl on the journey
For some reason I got banned from Rodevs for using "AI code"
Pastebin: https://pastebin.com/bBuRxLby
Can anyone explain what's AI about this?
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
looks fine
Do you think this is AI generated?
im surprised how they detected that code as AI
no
i mean you cant detect if a code is by AI or not...
I agree
Oh okay
this looks entirely human
ye cuz it's literally next to impossible. i mean what are you gonna check? plagarism in the code? yeah good luck. they finna gonna ban us cuz i used the local keyword 🙏
lwk
some guy said that I could just wrap both the database code snippets in a function 😭
it could be ai because of some patterns, but there's definitely not any conclusive proof
Idk why but I feel like my code practices were so bad they thought it was AI 😭
which ones? i apparently can't see the code cuz pastebin is banned where im from 🙏
The policy of banning People who uses AI is absurd. Its like banning the use of calculator in mathematics exam, just WHY. Check the quality of my work. if an Architect builds a solid bridge, nobody gives a fk what he used
Okay man atp you're just changing sides 😭
you're right about that analogy but tbh at most, AI creations should be moderated to some extents
cuz like it lacks originality and when you're using AI for say, a commission
it really is just scamming the person at that point
You wrote this a few mins ago btw 🥀
true
wdym "lacks originality",
You gave me your requirements, and I achieved them all, What else you want?
quality, my friend. quality. AI lacks quality.
compare a humans art vs that of an AI
you see a major difference.
True, AI is pretty bad when you fully depend on it
100%
i'm not saying it's not bad, use AI but don't overdo it.
True
wanna use it for your games as placeholders? fine. go ahead.
but don't use it for commissions, events, etc etc and if you REALLY want originality and some quality and "human" feel to any work, just don't use AI to do it.
Some guy decided to alter my appeal to a scam appeal🥀
That's very true
anyways yap session ended. i should lowkey work on my game 😭
they on the breaking bad stuff
lwk
As long as you understand all the code and can debug and edit seasminglessly it doens tmatter too much
Quality is also a part of requirement, If the code quality meets the requirement, then it shouldn't matter
given the code isnt trash
Yes
vibe coding gets bad when you have 100+ lines of code u dont even know exist or what they do
I was banned from RoDevs because i joked about being on my alt
is rodevs even a good server
Hiddendevs & rodevs are both bad
that's the point. try getting an AI to make a game that has quality code and doesn't get crapped on easily.
You just suck at prompting and giving relevant context to the LLM
do me a favour, get an AI to make a good looking code.
what does this have to do with prompting
any topic, a custom camera system, movement system, wtv.
let's see if it has "quality" or not.
Trust me, you can get an AI to exploit the hardest kind of vulnerabilities (Stack/buffer overflow vun) if you know what you're doing.
will it be full of bugs? lacking security? lacking flexibility? or will it actually be something the future will be built upon
okay let's put it to the test then
A cyber sec researcher got AI to exploit thousands of vun in open source projects including linux
i forfeit-
is this about that new claude model?
no
thats just to create hype
to justify their absurd plan prices
i believe
can you provide source?
i tried searching it's just about mythos
sure wait
HEy claude, hack roblox and give me 1b robux 🤑
nanana
Hey claude, hack the white house and gimme 69 billion dollas
bro that's mythos..
Bro they atually cant realess mythos or i will hack everythin 💀
can you read?
its an old post
mythos just in keywords
its about opus 4.6
ohh okay
lol sql
Sql injection has nothing to do w sql lang itself
well in that case ig you are right that coding wise AI is good but artistic wise it still isn't the goto if you want a more "human" look on things.
AI is as good as the person using it. If your prompts are vague, it'll make assumptions which generates generic sub optimal code and behavior
yeah, sure. i get your point.
i wish you failure
big brain move muchacho.
man how much do i have to yap to be able to post links :(
i want to unleash my degen meme list /joke
Do any of you hit your usage limits with Claude or codex
i did once..? but only when i was using it for advice on some stupid thing..
Has anyone here tried to learn a memory language after something like lua or python
How hard is it
People on Reddit say it’s not hard
Some people said learn C before C++ but others said that good C code is trash C++ so you’ll be wasting time
learn C then C++
C++ is literally C with a few mor things
C gives you a good idea on memory management
C++ is like the upgraded tutorial
Kk
ye
How how much experience u got with C and C++
i got much with C but not SUUPER much with C++
like i'd say im decent..?
not the best, not the worst.
Or you can skip C entirely unless you want to for some reason
you can but i won't personally recommend that
C and C++ are very similar but C is good for beginners as compared to C++
learning C then going to C++ is a good strat imo.
rest is upto whoever wants to do whatever.
I’ve seen like memes about c++ template errors
means you suck designing code and at creating generics
I heard meta banned template metaprogramming because it added unnecessary complexity
yes extremely unmaintainable
any good public state managers out rn?
Meta programming only sounds good in small scripts, in large production codebase it's a nightmare to manage
charm
use rc.5 it changes from atoms to signals
atoms bad?
I thought rc.5 was causing bunch of problems
How much experience do you have in c++
nvm I read it wrong
idk 2 years, Only limited to simulations, games and servers
signals are just better
theres actual getters and setters instead of a single function for both
its not bruh, have you seen the list of undefined behaviors something as simple as i = i++ is undefined, any assignment can happen first
where do i find a scripter
Idk
did this guy get kicked or what
is there is something I can open report UI for a player with or like at least roblox player list ?
instead of a terminal, can sitting down watching brawldev yt on a big 48inch tv and writing down code in your notebook be effective too?
the goat himself
Print("Hello World\n");
Terry Davis Roblox Studio tutorial
its sad he didnt make roblox on temple
and died
anyone down to make a game, where you gotta throw your phone really hard, for points 🤔
Wait this might be the next best thing
Take my money
Add detection for when it hits a wall
For bonus points
Would anyone be interested in a rocket league heatseeker type game
dm
that would be tuff
🤣
This is Roblox studio luau not the language C lol
Yeah, just wrap it in a task.delay:
task.delay(2, function() local weld = Instance.new("WeldConstraint") weld.Part0 = partA weld.Part1 = partB weld.Parent = partA end)
Change 2 to however many seconds you want the delay to be.
If it is what I think your trying to say atleast.
thats when u want to make the object/part to be welded
lets say i connect a part to the humanoidrootpart using weld
and i want that weld to have a bit of delay so like when i move the part will also move after the delay is done
rather than moving the same time im moving
Ah got it, you want a lag/follow delay effect not just a delayed weld. For that you'd use a loop that smoothly lerps the part toward the HRP position instead of a weld:
local part = -- your part
local hrp = character.HumanoidRootPart
local SPEED = 0.1 -- lower = more delay
game:GetService("RunService").Heartbeat:Connect(function()
part.CFrame = part.CFrame:Lerp(hrp.CFrame, SPEED)
end)
The lower the SPEED value the more it lags behind. A weld won't give you that effect since it moves instantly — lerp is the way to go for this.
I think I answered your question.
ye i see
i am using CFrame.lerp
but when used on server, it becomes bad
it aint smooth at all
so i use on client
but no one sees it
so how can i fix that/
Yeah that's a classic network ownership issue. The fix is to move the part on the client but use a RemoteEvent to tell the server the position so other players can see it. But honestly the cleanest solution is to just set the network
owner of the part to the player:
part:SetNetworkOwner(player)
Put that on the server when the part is assigned to the player. Once they own it, their client controls the physics and movement and everyone sees it smoothly — no RemoteEvents needed.
If it's an unanchored part this should work straight away. If it's anchored you'll need to keep the lerp on the client and sync position to the server periodically with a RemoteEvent.
Should be able to fix your issue.
woah
setnetworkowner?
so after i lerp it
i can just do that
and everyone will be able to see it
and plus
the client will handle the physics and stuff
which will make it look better
Exactly, but just to clarify SetNetworkOwner doesn't work with lerp directly. Here's the distinction:
If the part is unanchored:
Just do part:SetNetworkOwner(player) on the server and the client automatically handles the physics. Everyone sees it smoothly, no extra work needed.
If the part is anchored:
Network ownership doesn't apply to anchored parts. You'd need to lerp on the client and use a RemoteEvent to sync the position to the server so it replicates to everyone else.
So which one are you using — anchored or unanchored?
its a rig
and its all unanchored
Perfect, then it's simple. Just set the network owner on the server when the rig is assigned to the player:
rig:SetNetworkOwner(player)
Then do your lerp on the client like you already are. Since the client owns the network, their movement will replicate smoothly to everyone else automatically. No RemoteEvents needed
alr bro ty
what is the best way to code a projectiles? like should I fire instantly to the client and mark the time with getservertime then send it to server to fire for everybody else?
No problem
Client sends only what is neccessary to server (shot origin, shot direction, unix time or however you track time), server makes sure this data is possible, then replicate to other clients via that same data.
so I was somewhat right?
Pretty much
I recommend doing hit detection on the client and validating the projectile trajectory on the server
how does animating work in a viewport frame?
hmm what if client is lagging though?
you can (if you have a good caster) calculate the time it should take for the shot to hit said position and determine based on that how laggy a player is.
You can add a valid range of time for the shot to hit it's target like 1 or so seconds
if the client hits the target outside of the valid time frame from the time the shot was fired then you can choose to invalidate the shot.
Add a WorldModel to the viewport frame and parent the rig to the WorldModel
can i still play the animation on the humanoid
or nah
yes
Yeah, whats up?
erm i tried using the plugin but its not working
if you wonna join voice i can show
yes
What plugin...?
can server scripts in roblox accidentally share state between sessions because of module script caching? bcuz i'm seeing data persist across matches when using modules as singletons. is require() caching causing this? or wha
Can someone help me with a InventoryUI? So when I equip a tool it goes into my backpack even though I have a script preventing it from going inside of my backpack for my InventoryUI and when I try to unequip it, it just's equips again.
Yeah require() caching is exactly the cause. The module loads once when the server starts and stays in memory the whole server lifetime so any state stored inside it like player tables or scores never resets between matches unless
you explicitly tell it to.
The fix is just add a reset function and call it at the start of each match:
function Data.reset()
Data.players = {}
Data.scores = {}
end
Call Data.reset() when your new round starts and you'll have clean state every time. The caching itself isn't a bug — just make sure you're not relying on the module to reset itself because it never will.
ai response 🙏
can you explain more
wdym by between sessions
and what data persists
so require caching isn’t the issue itself? it’s more that using modules as mutable state makes lifecycle management implicit but wouldn’t it be safer to scope state per match instance instead of relying on manual reset calls?
ya lemme explain
Exactly right. Manual reset is fragile if any code path skips it or errors before it runs you're back to leaking state. Scoping per match instance is the cleaner architecture
by sessions i mean like individual server instance. a match or round can restart inside the same server without the server actually shutting down. modules are cached per server process so anything stored in a module table (like player data cores wtv you got) will persist for as long as that server is alive. it doesn’t reset between rounds unless you manually clear it or recreate the state
just in case youre unaware, theyre just putting what youre saying into ai and giving back the response
seems youre essentially just talking to claude with a mediator
i'm just going w the flow ngl
i expected a real reply but
atp i might js dip and ask claude itself
😭
well okay thanks
not claude
thats gotta be chat gpt
since its so willing to just hallucinate details
Send me something broken right now and I'll fix it live. That's the only proof that matters.
If you want to compete then ig.

i never said it wasnt helpful, i didnt reply because you already had
i'm just pointing out that you're using AI to respond and it's taking longer than if they went and used AI on their own
At this point your just rage baiting.
its the ui scale one like the one that add constraints and like unit conversion
Ohh I see
Dugga
gang, you arent creative when you used ai ❤️
you cant call yourself a coder/scripter if you used ai to do your nasty work
such a embarassment 🙏
"Exactly right. that response looks like mine, im sorry. to know the difference between human and ai, you must check their stupidity."
who is u tho
a scripter
just becuase i was lazy and i didnt wanna do it myself doesnt mean im not a scripter
like
even your works are ai
your not even in my server how would u even know 💀
i check it
and leave immediately
your anti-cheat script is entirely ai. even the description is ai. whys that
ragebait competition
count on who won ❤️
im good bro
the only prove if you show the script
because i would like to show you the explaination
I dont need to show u nun lol
too scared to show the ai's work?
because im not insecure I dont need to prove to a little kid like u on discord all day telling me im wrong like who is you.
im not wrong or right. using ai to explain someone's help is bad because theyre outdated and not right all the time!
i cant seriously read this and not think it's ai though lets be real
nah
dude literally has an em dash in it too
i will check your port again
alr
and you expect people to believe your competency if you have to reply to a basic question on how module scripts work with ai
im just saying man
nah your 100% right though
in your admin system, the button has the text "Button" on the center 💔
use your own description beside ai because you have to show that your work is legit and knowledgable
that doesnt mean it's ai though like
sure but i got the same result with ai
not entirely the same but similar
bro
doesnt mean nothing
it does?
it really does
and i want to end this arguement right now
because this is nonsense to use ai to act like a developer
How if it isnt the same I could go to ai rn and go ask it to make a admin system that is the same
Like you dont make sense
please do ❤️
and use the same prompt like you did on the admin system please.
whats going on
what im saying is that not matter whos admin system ai is going to try to get super similar results
developers
why do you think its not matter when the same style of yours and the ai is literally the same!
specify
using ai to act as a developer
like ai scripts
not mostly
using ai for anything else but scripts is uhh
i will ask claude to generate a admin system ui and give you the result
bad
Senior devs at actual studios use Copilot, Chatgpt, everything. using a tool doesn't make you less of a developer, not understanding what you built does. I can explain every system in that admin system line by line the rank hierarchy, the remote event. system, the tween values, why the overlay is a TextButton and not a Frame. can someone who just copied AI output do that? ask me anything specific right now.
Like
your honestly wrong
i feel as if your some "ai bro"
you can explain it to me right now?
im ready to ask questions
okay ask me lmao
dont use ai ❤️
You dont have anything.
how would you make a Announce button in that admin system. how does it work
text button
and script
Exactly, because you think its ai but its not.
thats not the answer im looking for, quit stalling and answer it immediately
Im answering it right now hold on you messed me up
ai is okay imo under a few circunstances
- codebase is heavily obfuscated unreadable
- slop game who cares tbhh
- debugging tool
waiting for the ai's response
is it okay for like placing notes
if its a huge script
the anounce command fires a remoteevent to the server which then like broadcasts it to every client and then each client has a listener that slides a banner down from the top showing the message
like
commenting ?
its okay to use it for optimization and debugging! not using it for everything
yeah but like it explains a certain amount of sections in a huge script
maybe for when i forget
how about this, how did you "Implement" the ban system, not acting as a kick but actual ban
ai is weak when it comes to huge line of scripts tho.
i mean it could possibly comment correctly
stronger LLMs nowadays are really strong at writing code but still requires a lot of supervision and guidance
but if tuned right or used correctly you can save yourself a ton of time actually writing the code
have to prompt it perfectly and bit of a reprompts
maybe
The ban stores the player's UserId in a BanList table on the server. When the player joins playeradded checks if their UserId is in that list and kicks them immediately if it is. So even if they rejoin they get kicked on entry before they can do anything its honestly common knowledge.
having actual technical knowledge allows you to cut down the time you spend on designing the systems and fixing usually obvious design or technical flaws which still is much better than writing code yourself if you understand the underlying design
its not honestly basic common knowledge.
never knew you talk so slow.
The only reason I have used ai for the description of my scripts beacause it makes it sound more elegant
Im thinking what to say.
but that would ruin your own hardwork 💔
and personally i use ai all the time nowadays saves me a lot of time writing code i cant be bothered to write myself as long as i vet it
same here ❤️
elegant??
Is that bad now
why u need it to be elegant
yes?
sad
I dont know because I like it?
describing is not the same as writing
make it elegant for a script inspector
yall are just witch hunting if you believe using ai to write an elegant description isnt actually valid
nicce
its not like william shakespare writing
not that i believe he's not using ai to reply to your questions but it's a step too far
please look up 💔
i think that would be funny
it just looks unnatural, "Exactly right"
Bro
becuase look at this gang
I dont know what to say anyone you ragebaiting at this point
ragebait competition
no keyboard has "—" key
not ragebaiting, giving you the taste of reality
if you want to rely on ai entirely, go for it. its just laughable when you want to vibe coding and be called "Professional coder"
okay hes calling himself a coder while using ai
ragebaiting you
lol
thats like microwaving frozen food and called yourself a professional chef
exactly
what
cant you look for a minute please
like it snot
an em dash is not two dashes bro
— -- -
completely different symbol
you need to hold alt and press 0151 on your numpad to type that in anything other than a word processor lol
I didnt say what i said earlier wasnt ai im saying my work isnt ai
true, thats my wrong there. why would you use ai to describe something when you got a brain
god gave you a brain for you to think, not ai ❤️
too bad ❤️
Your right a 100% but I honestly feel like I could get a better description from ai because its almost perfect.
perfect is an overstatement
you can write better than ai?
no need to be perfect! this is not a interview or something
I guess.
not me but many great authors can
i enjoy reading really well written works like those
hes not getting a job anyway
i made a story about 2 stickman fighting each other
I mean your the one who's saying it though
course, doesnt mean i need to be able to write at that level
im just an admirer
What r trying to say lol
Okay
why is it that when i print tostring(PlayerData) (module) it will print 2 different things
playerdata.profiles (a table) has data inside of the playerdata module itself but when referenced externally it has nothing
is it server to client or server to server
server to server
a module requiring another one
make sure the instance are the same ❤️
because same thing happened to it. i have to use it in server to server
what do u mean
if you have 2 instances, they have different references
when the table changed in playerdata it should change across all points its being referenced no?
nvm i foudn the problem my bootstrapper is broken
yes it does ❤️
bootstrapper has that problem?
bootstrapper is supposed to load the thing first but another module loads it first instead
ahh alright. thats interesting, glad you solve it yourself ❤️
Is there any solution to preventing user from flinging
my dash code use BodyVelocity and MaxForce
how to get the fav prompt and group join prompt
Guy what is UIAspectRatioConstraint and how I can work with them? Have any one a good tutorial or smth for me pls 
Vanilla is a professionally-designed, function first icon pack for Roblox Studio. Every icon was drawn with glance-ability, clear forms and a consistent style in mind, to serve as effective landmarks in dense UI. A pixel-perfect duotone look ensures maximum legibility and an efficient usage of pixels to convey shapes, edges and depth. Geometr...
bc he is cool 😎
oh cool
hey guys is it a good way to learn code to find a copy of a game i like and look at the code and learn from that?
my friend advised me to do this
yes it is
but if advise
you have a good understanding of the basics first
otherwise you won’t understand any other game you look at
i did a tutorial series and i somewhat understand what stuff does