#code-discussion
1 messages · Page 252 of 1
isnt there no passion in coding for yourself?
no there isnt i write code 8hrs a day already i just want to come home and make things
0 passion?
you do not have passion?
why bother writing code 8 hours a day
you dont need
akundisco passion is not the problem here ahaha
employment
its not your passion
if i dont make money i cant pay rent?
go find a job that fits your passion
no no
like can you make music
if coding doesnt fit your passion
alright lemme review it though the thumbnails irk me a little
anything thats your true passion
dude creating is my passion and id code roblox games myself if i have to but i dont have to because ai writes the code for me
"income"
create lego prosthetics arm
LOL
create a new invention for cure cancer
create a new viral video
ineternet i beg of you please just stop talking now and embarassing yourself. your "game" is not even mouse locked??
thats so bad
he should quit coding bruh
dude hes an idiot
but im not coding
i already said that the ai codes for me
my bad
i mean creating games for roblox
you should quit that
why would i quit that
it wastes your time
you know a game involves more work than just coding
there is no result
1 month for what
i achieved money within 1 month and its using ai too
and not related to roblox
there doesnt have to be a result its just a hobby and its fun to make games?
you said you want to make money
when did i say that
you
then stop trying to sound knowledgeable in roblox development discord servers when you quite literally know nothing in the grand scheme of things.
fricking idiot
i like your enthusiasm but like the game is a bit too dry for "15k" lines
i had to say it
yes i said that im coding 8hrs a day to make money this is called a job
and its not on roblox
and then i come home and work on my roblox game because i like making games
bro that coding 8 hours a day has result?
LARPING ABOUT A JOB??
dude stop
im literally clipping through the floor
thats not a great job
where
8 hrs a day of sitting in the couch with crusted cheetos fingers
you are replying to a guy talking about my roblox game which is again not my job
the top most floor in the garage part
like bro
u havent even started the game yet
atleast put some work
go in the elevator
its so lifeless
ineternet please never try judging anybody in your life again ahaha, this isnt your area of expertise
why would you make something that doesnt contribute to anything
i mean it contributes little
i never judged a person i said what i know about ai for making roblox games
im in the game wdym
but why
????
yeah, and clearly you dont know enough?
you should already create a new lego prosthetics arm
there is no garage in the game place youre in the lobby i think
instead of wasting time on ai slop
so why do you think your opinion carries any weight with it?
if creating is your passion
i dont have to use ai i just use it because its faster
and youve never produced anything of reasonable quality?
now you think you can try and say im wrong?
like bro if creating is his passion why he create slop for 1 month instead of a good thing in real life, like something that helps people
🤦♂️
like he needs to asnwer that
do you know what a hobby is
theres no UI cant tell
add ui elements
like tiny bit
you telling someone to change their hobby makes me think you dont know what a hobby is
change your hobby
its not worth it
go in here on the bottom floor and press the start game prompt
idk why would you make this game anyways
so you still dont know what a hobby is
uh i reset and cant spawn back not sure if its a ping issue on my part
yeah that hobby sucks
i think you have to rejoin then i never tried dying in the lobby
if killing people is an hobby
aight then
what do you mean justified
like people go skateboarding as hobby is that a bad thing also
are you dumb
this ai slop is viewed bad to most opinions
you dont see the code when you play the game how is it slop
none of the in game assets are made by ai
well well
i won
you contradicted yourself
thats what i wanna hear
the only statement i made is that 100% of the code is written by ai and that remains true?
not really
you said
something that contradicts
what is contradicting that
this
thats intentional you can just select an upgrade yourself
i did i thought it was meant to close automatically
you have to click the text the ui is bugged i havent worked on that yet
the result of ai code bro
alright i will give credit on dragging objects n stuff thats neat
but uh its a bit unpolished
i think thats just
is that custom dragging
sometimes when grabbing it kinda clips you through the walls
these things are hard to get right and im still working on it but im focusing on getting the necessary features working before polishing the rest
i never said heres my fully working game :/
it aint hard
if you played the game you would undestand that it is hard
on that note the enemy npcs fighting is polished which i like but is a little bit of uh how should i put it
is it hard
a bit unpredictable
not that hard
bro whther u use ai or not doesnt matter if people wont even see the code
yeah i got your opinion
i mean im running 48 chrome tabs while playing on an i3 laptop
bro it would be broken
not always
i mean all the result of ai code is exploitable
well almost all
@peak jolt i suggest learning a bit of basic programming concepts to fully polish the game even if you use ai or not
he codes 8 hrs a day
he probably knows
oh
i mean not if you understand it
i mean honestly 8 hours a day and this game is a bit of a lacking
but i could see the direction they were heading
i havent worked on this game 8 hours a day for the 5th time
i do this when i have time i said 8hrs a day is my fucking day job
ah thanks for clarifying
i mean bro
i completely understand if u mean that sincerely but i can also imagine u havent tried every feature there is to offer yet
which i cant blame u for either cause there isnt a tutorial or many in game hints in general
no no its fine i tried my best to play but i cant as im running roblox studio with actual 12 tabs and your game
its sortof my fault also
however i still would recommend getting basics done of coding if you have like maybe 10 mins of time trust me its really helpful
it would be really nice since you would be able to patch any bugs yourself without having to keep on constantly prompting (i had this happen to me)
i do know how to code my whole point at the start was that ai is not great for learning but it is great for writing bulk code if you already know how to do so yourself
but also its actually often faster to ask ai to fix bugs just because it can do so in a lot of files at once + you can parallelize it
i agree to a bit of an extent however from personal experience i have seen more harm being done to my codebase than actual progress to the point i actually was burnt out
its my opinion but you do you ig
there are surprisingly little "bugs" in general i mean stuff like clipping through the floor isnt a code bug its just an oversight/lack of a feature
it sometimes reaeches the point where if there is limited training data then it will not output great result
cause it just aligns u to the object
like i could ask ai "make it so the object is animated for the first few frames" i just havent done that yet cause that would be a lot of lines for little gameplay payoff
tbf i gave the AI i was prompting a very unusual task something which is usually done by implementing your own neural network library inside of roblox
for really simple games ai can excel
your game is the training data though
oh my god
do i have to explain ai policies
im using new apis that the ai 100% doesnt have in its training data but it just knows how to use it because its already been done 10x elsewhere in the codebase
i wish i could share a pic of why i dont trust ai with bulk code especially mine but i cant
idk if there is ai policies
this is also why git+rojo helps because you can make changes in a feature branch and you know exactly what the ai did + code review it + precisely undo specific things it did wrong
which model?
to protect your game becoming training data
chatgpt codex
well like i said 100% of the code is ai generated so u cant really apply that here
honestly you do you if you want to get it done by AI then go ahead as long as you dont rub it into others faces
from the very start
mine was too from the start
i just said here that i know from experience that ai can do this task and got shit from ppl saying the opposite (evidently without having tried it properly) like i just put my game as an example for why it does work i didnt really come in here to show off my ai generated game and ai is so good guys
same in terms of experience except mine aligns with other's experiences with AI
again you can make your game however way you please its just im a bit concerned your game may have potential security holes
yk from experience
truth be told i didnt even reach more than 2k lines of code, i've actually almost achieved majority of my tasks under it which ig could be an accomplishment
(i thought i needed to code 30k lines total!)
yo is coroutines really worth learning rn?
depends
wym
i said it depends
means
whats your project
in the future?
@old forum
so im just going to be a scripter for others
not really me making projects at the moment
its not worth it if you are dealing with
stuff that
yield the code
which almost doesnt happen
coroutine is somewhat my lifetime lol
ive been trying to learn the coroutine.wrap
whats that mean
ehh not my taste because it requires more hand fingers power
yea i understand
for you
i use it cause you can split stuff into pseudo-threads
not required i think
oh
making scripts for people need fast work
everytime i make scripts that are not modular, and the second a change comes everything just falls, it feels like i have to have everything planned before i even make 1 line otherwise everything crumbles apart
oh fr
this i agree 100%
yea just learn stuff like vectors n shii
yeah super good
aight so imma kip coroutines rn
oh ok
what have you learnt
i suggest learning optimizing codes and make it less time consuming
so you can do efficient work and chill more faster
and still get paid
if you are tryna make money
this and if you are really new learn about arrays and programming concepts in general
first learn the basics and basic optimization and then go forward with position vector stuff and then to coroutine handling n stuff
Broo i cant find a scripter that can make me a train system
i have learned the basics like lexical script functions and shi but now i want to get into the advance stuff
which
bro stop doing advanced stuff
its not recommended
I cant find no one to make me a train system
no no they want to move forward with scripting
wait so what do i do
Also how can i hire a physics person
yea
intermediate first
like i have alr have done the basics
Can you make train systems
oh dang
so you know about arrays, dictionaries and tables in general?
idk maybe are you willing to pay
how to manipulate them and all?
Noo im gonna let someone do a 3 week scripting for free xdd. Ofc
stuff like 1D array where it is like a list and 2D array which contains 2 things per index
Its half finished the system
yes sir array is in chronological order and dictionaries are not in order so you will have to use key value pairs
Im willing to pay
nice
ok
im in
ty
yo
DM ME i need help
i have used the task library with yeilding
like this
i mean its a bit basic
i kinda wanted to mean as in advanced task library stuffs
yea it is super easy to do
like task.synchronize()
but efficient
or task.desynchronize()
TASK SYNCHRONIZE
uh whats that
..
ik what parallel is
Serial means it goes one by one. so like first it would print AHHHH then it would print NOOOOO
now task.desynchronize() is used to run functions (keyword functions) in parallel
you simple use it inside a function
to make it run parallel to the main script
maybe this would make more sense
so it runs al togehter
oh yes of cs the ()
idk if im just confusing you further with it tho
ohh
yes this
thank you
one important thing though you cant use certain things when using task.desynchronize or when you are running a function in parallel
why does he need parallel luau?
things like humanoids
he wants to advance his k n o w l e d g e
ah
i feel like parallel luau is something you learn towards the end of your learning journey as you wont ever really need it
but 🤷♂️
i learnt it few months back lol
wow
yea i learned it like a year ago and made a multi-threaded real-time raycaster with it
oh yeah good idea i should try that
is it hard to make a shop system
not even close with the skill level of yours
you could make it with in like 10 minutes honestly
oh i thought you were saying it's hard
my brain is currently undergoing maintenance as it tries to process the debauchery of a code i wrote few mins ago
(i put 4 for loops in a while loop running each 0.001s with additional for loops inside the for loops)
im refactoring my entire codebase atm
idk what im doing with myself
reorganizing everything lol
wow
i cant even look at my own codebase
without regurgitating
oh shii i forgot to ask if you have learnt about remote events
im trying to make everything perfectly
so that implementing new features is really really smoothe
how do you structure your games
not yet i reallly want to though
it used to be really bad but
what im doing now is
i never understood how they worded
ohhh mb you prolly should do that first and foremost
oh ok np
grouping everything by feature so
basically some roblox players are a lil quirky and very no no evil
so roblox was salty abt it and decided to seperate client and server
what in the world is that organization holy
thats dedication
nice single script architecture?
NameTag manager has a module inside of it
which is a single module of class NameTag
has a constructor .new() and :Update()
the NameTagManager
controls all the NameTag class instances
it's easier to do everything first than organize it
opposite imo
but do you load your modules inside a global table?
--@author: DriftingDigit
--@date: 21/01/2025
--[[@description
Controlls
]]
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local Utils = require(ReplicatedStorage.Modules.Utils)
local NameTag = require("@self/NameTag")
--
-- TYPE DEFINITIONS
--
export type NameTagManager = {
Init: (NameTagManager) -> (),
AddCharacter: (NameTagManager, Model) -> (),
NameTaggedCharacters: {NameTag.NameTag}
}
--
-- ENDOF TYPE DEFINITIONS
--
local NameTagManager: NameTagManager = {
NameTaggedCharacters = {}
}
function NameTagManager:Init()
for _, character in workspace.Living:GetChildren() do
self:AddCharacter(character)
end
workspace.Living.ChildAdded:Connect(function(character: Model | Instance)
self:AddCharacter(character)
end)
RunService.RenderStepped:Connect(function(deltaTime: number)
for _, nameTag: NameTag.NameTag in self.NameTaggedCharacters do
nameTag:Update()
end
end)
end
--[[
Adds character model to NameTagManager.
]]
function NameTagManager:AddCharacter(character: Model?)
if not character or not character:IsA("Model") then return end
table.insert(self.NameTaggedCharacters, NameTag.new(character))
end
return NameTagManager```it makes it so that my nametag manager code looks really nice and easy
what is "self" used for? (sorry for sounding dumb)
i never used it and usually ignored it
ahaha dw ive only ever properly found out how to take advantage of it a few weeks ago
basically
its for objects where the method either needs properties of the object or will change properties of the object in what it does
like think of a Tool object with method :Equip() and property RBLXTool
you need that property to equip the tool. To get it, you would either have to pass the tool into the equip function or use self (which is a parameter automatically passed that is the object the method is in)
say you make a class like this
local NameTag = {}
NameTag.__index = NameTag
function Nametag.new(character)
local self = setmetatable({
Character = character
}, NameTag)
return self
end
function NameTag:PrintCharacter()
print(self.Character)
end```
now in another script you can do
local NameTag = require(ReplicatedStorage.NameTag)
local localPlayersNameTag = NameTag.new(Players.LocalPlayer.Character)
while task.wait(0.1) do
localPlayersNameTag:PrintCharacter()
end```
ah i see
local myTable = {}
-- this is identical
function myTable:Print()
print(self)
end
-- to this
function myTable.Print(self)
print(self)
end
it was sorta hard for me to wrap my head around how to use this properly
but once i figured it out, it helped my workflow a HUGE amount
this actually might be helpful for me lol
they're amazing imo
i've been thugging out with making algorithms and stuff from basic stuff like for loops and ofcourse the regular libraries roblox offers 😭
could've spent less time finding some obscure way of doing things and instead could've used this
this is like OOp
yes
beacause the self
it's OOP
hi
its kinda hard to do that for me
i dont get the the self
see i cant write this agin
really?
yes
your code is entirely correct just change the print at the end to this
oh ok
or whatever function you wanna call
broo i want to make a tower slap game
huh?
slap tower?
i mean you can use it i dont usually use it much
its like coroutines kinda though a bit more simpler
its better if you first learn about stuff like remote events then go on to this
ihave the metatables down but to use it often might be a challenge
oh ok
your gonna need those more interms of client to server communication (i.e player input to server's processing and output)
ohh ok
.Name
no lol
printing an instance prints the name of the instance + the instance source in the explorer
which is better
open souce luau?
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded
local humanoid = char:WaitForChild("Humanoid")
------Services
local UserInputService = game:GetService("UserInputService")
local Bat = script.Parent
------Animations
local BatIdleAnimation = Bat.BatIdleAnim
local BatIdleAnimTrack = humanoid:LoadAnimation(BatIdleAnimation)
BatIdleAnimTrack.Priority = Enum.AnimationPriority.Action
BatIdleAnimTrack.Looped = true
local BatWindupAnimation = Bat.BatWindupAnim
local BatWindupAnimTrack = humanoid:LoadAnimation(BatWindupAnimation)
BatWindupAnimTrack.Looped = false
BatWindupAnimTrack.Priority = Enum.AnimationPriority.Action2
local debounce = false
Bat.Equipped:Connect(function()
BatIdleAnimTrack:Play()
end)
Bat.Unequipped:Connect(function()
BatIdleAnimTrack:Stop()
end)
Bat.Activated:Connect(function()
if debounce then return end
debounce = true
BatWindupAnimTrack:Play()
task.wait(1)
BatWindupAnimTrack:Pause()
end)
Bat.Deactivated:Connect(function()
debounce = false
BatWindupAnimTrack:Stop()
end)
why when i hold left mouse button here the animation doesnt pause but stops
Right now you have to define self explicitly if you want to do oop 'right' and get static analysis. The shared self RFC proposes that all methods defined with : syntax share the same metatable, making oop less annoying in luau.
current 'best' way:
ai
?
isthis in roblox or open source cause u cant like use type in rblx
i dont totally understand you here
does it have to do with the type system?
actually
this code works in both roblox and outside roblox
oh
i do understand you
but there's a way around what you said no?
you can use the colon syntax
aint nobody want basic beginner work i thought i could gain experience lol
one second
usure gng, type doesnt work in roblox cause u cant make your own types the normal way
why would roblox spend 4+ years adding a type system to luau if you can't use types in roblox
you need to set --!strict at the top of your script or change the workspace property for strict typechecking
u cant bro
is this bait
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded
local humanoid = char:WaitForChild("Humanoid")
------Services
local UserInputService = game:GetService("UserInputService")
local Bat = script.Parent
------Animations
local BatIdleAnimation = Bat.BatIdleAnim
local BatIdleAnimTrack = humanoid:LoadAnimation(BatIdleAnimation)
BatIdleAnimTrack.Priority = Enum.AnimationPriority.Action
BatIdleAnimTrack.Looped = true
local BatWindupAnimation = Bat.BatWindupAnim
local BatWindupAnimTrack = humanoid:LoadAnimation(BatWindupAnimation)
BatWindupAnimTrack.Looped = false
BatWindupAnimTrack.Priority = Enum.AnimationPriority.Action2
local debounce = false
Bat.Equipped:Connect(function()
BatIdleAnimTrack:Play()
end)
Bat.Unequipped:Connect(function()
BatIdleAnimTrack:Stop()
end)
Bat.Activated:Connect(function()
if debounce then return end
debounce = true
BatWindupAnimTrack:Play()
task.wait(1)
BatWindupAnimTrack:Pause()
end)
Bat.Deactivated:Connect(function()
debounce = false
BatWindupAnimTrack:Stop()
end)
why when i hold left mouse button here the animation doesnt pause but stops
no llike imn roblox if u make a script u cant just do
type water
yes you can
go to #code-help this channel is for code that works
local NameTag = {}
NameTag.__index = NameTag
type self = {
abc: number
}
export type NameTag = setmetatable({} :: self, NameTag)
function NameTag:Abc()
print(self.abc)
end```this works fine with colon syntax
unless im missing something
@prisma shell
the wait
isnt OOp like making parts inside of scripts
not open source, in roblox
roblox uses luau
not the exact same
they are the exact same
the exact same dude
no thy arnt
i think that person's just trolling
yo
the luau source is literally under the roblox github account lol
it's under luau-lang but we get your point
oh it is?
the luau programming language team is employed by roblox corporation to make luau. they have invested heavily in making a type system so roblox programmers can write code that has proper autocomplete, hover documentation, and has a higher guarantee that it doesn't explode at runtime
no like , on github that luau doesnt have any of thes service, cant use load string well on roblox luau
yea but the type system is really bad
types are a core part of the language so roblox has them
same way it has buffers and vectors
roblox has types u cant make more the standard way
roblox data types like Instance, game, etc. are called extern types and are injected into the Luau programming language by the embedder. In this case Roblox is embedding Luau into Roblox's game engine, so in roblox you see Roblox's extern types.
that is the standard way
not that
--!strict
type NameTagInstance = BillboardGui & {
PlrName: TextLabel
}
local nameTag = workspace.BillboardGui :: NameTagInstance
local plrName = nameTag.PlrName -- warning```
go open a script yourself and test it man
If you want to do what roblox does with classes like BaseParts and whatever, you need to be a Luau embedder (not a user!)
to be fair, this doesnt exactly have to do with the type system being bad
clearly some roblox bug
that's a bug, they'll fix it whenever
but i spent hours thinking i was doing something wrong
when is "types" getting autocomplete when i'm writing type functions
you used to be able to fix that by doing { plrName: TextLabel } & BillboardGui
it's so ass to do it in studio
that didnt fix it either lol
uhh this already works in luau lsp
ye i remember it did
i've switched to studio for newer projects though
might have to use vsc JUST for writing them 😭
Fun fact, even tho it used to work in old solver and even though it's extremely helpful in Roblox, the luau team doesn't like this because techically, intersecting an extern type with a table type is nonsense and impossible. It just happens that roblox decided to override dot syntax (workspace.SomePart) 2 decades ago and now luau has to live with it
like, you can't just add more properties to a DateTime by doing local customdt = datetime.new(whatever) :: DateTime & { extrafields: extravals }
yea but how else would you then define children of instances? the type system would be useless in roblox
roblox magic functions
typeof(nametagtemplate)
i remember doing that and it had it's own issues
no clue how else you'd do it
that's why they came around to wanting to allow it. otherwise there might've been a type function to type them
for complex instances it didnt index all of the descendants i believe and there were some other issues
so after running into like 2-3 really annoying bugs i just decided to drop strict type checking
the luau team too busy working on lute when there are alr multiple perfectly good luau runtimes that actually work and have decent DX that they aren't doing shared self or making Extern & { fields } work on roblox
what is lute?
don't worry about it
C++ jumpscare
i would absolutely love to use the type system in roblox i just wish it wasn't as buggy
ironically, luau's type system is great for stuff outside roblox
i really enjoy using luau instead of python or ruby for scripting; it's great as a shell replacement or when you want something lightweight that's faster than python and does its job well.
do most other games using embedded luau also use a tree hierarchy for instances
or is them not using that the reason luau fits better
or do you mean it’s better like, in non game engine scenarios
If you want to try luau outside roblox I recommend starting with seal because I made itit's reliable and easy to use, has high level apis that are more expressive than their equivalents in python, is easy to throw into existing projects as a shell scripting replacement, etc.: https://github.com/seal-runtime/seal
Oh also it's fully typed (new solver) and has inline documentation (thanks to Luau Language Server) for its entire stdlib api
why would i use luau in anything outside of roblox
cause its the goat
cus it's fast and familiar
interpreted languages are not fast
compared to python
python is also not fast
<it's fast> compared to python
im not even tryna be a stickler either, i just dont think interpreted languages are the move for most programs outside of game engines honestly
its a cool project though, good job
thats kind of contradicting tbf
if its performant enough for game development its performant enough for anything else in most cases
its not performant for game development is the thing
roblox needs lua because their target audience is to make development accessible, not fast code. the engine is intentionally lightweight
its about abstraction
if im making a program outside of roblox, i shouldnt abstract for myself to lua if that makes sense
i haven't ran into an issue where luau's execution time is a bottleneck, even with mluau's safety overhead. it typically performs much better than equivalent programs in python or ruby for light general purpose programming or shell scripting.
lua and luau aren't even good languages for abstractions. you have to write everything yourself and you don't have a first class syntax for oop or whatever.
yeah im not saying lua is worse than python or ruby, ur speaking to someone who also does not value python to the degree it is used; in essence im a contrarian lol
How do i hire people cause no one can make train systems bro
i think lua is the best scripting language on the planet, bottom text
luau is even better
i wouldn't touch lua lmao
i can't even read code without type annotations anymore 😭 😭
lmao
fair, i tried things like love2D a long time ago, it was cheeks.
truest thing ever
dude
lua is the best not because of its readability qualities or even speed (though it is fast), its the best because it can be absolutely anything you want it to be for the project you want
ive always wanted to use luau outside of roblox but i assumed nobody made the proper libraries for it
if you wanna make a program with lua, you need to be making your own runtime environment and customizing it like a character in an RPG
such as you know file io, http functions, etc
oh yeah seal has allat
true
it's more featured than the lua stdlib abt thta stuff
thats sick dude
epicsauce
drop lua and pick up any other language 💔
brainfuck
luau is amazing
whatever its called
I've been working on an FFI alternative for seal which is basically cdylib (shared library) external plugins you can write in Rust, C++, C, C#, or whatever language you want that can expose extern symbols.
this one is a wrapper around a rust crate that is a wrapper around a c library for webviews
does it literally say "at some location"
thats also really sick
please tell me it does
im not really understanding scoping all that well, is there anything that goes more indepth about it?
lmao this is just a proof of concept. issue is i'm doing some really unsafe stuff to pull this off that assumes Rust has a stable ABI. the actual API will require you to use the luau stack directly so you can't easily segfault by using a cdylib compiled with a different version of the rust compiler
is there some sort of simple api for ui? that seems kinda advanced lol
scoping?
roblox makes ui so easy but outside roblox have fun. especially if you're writing an application in rust
ahaha
maybe like an imgui wrapper
yeah i think once i release externs you'd be able to pull that off
there's imgui crates in rust im pretty sure
or you can just write the plugin in c/++
its hard to explain, you have a local function that can have multiple variables. you can either have one, a few, or all variables on at once
this is the worst way to explain variable scoping i've ever seen
hahaha yeah
I KNOW
i mean, what would be confusing about variable scoping
thats why im asking for help to understand it..
its pretty self explanatory i think
it's not self explanatory. our primary language in uni was python so once we switched to ruby for a class i had people who straight up did not understand variable scoping
this is my second day learning lua 😭
@charred trench can i dm you a guide
youre probably not learning lua, you're likely learning luau
they arent the same thing ;-;
do
local abc = 123
print(abc) -- 123
end
print(abc) -- nil
do
abc = 456
print(abc) -- 456
end
print(abc) -- 456```
luau is a modified version of lua made by roblox lol
in roblox studio you use luau
it just has additional features added on top of lua
rip, i dont have pic perms yet
very helpful to turn the function scope conversation into yapping about lua vs luau
ohhhhhhhhhhhhhh
i believe in lua you can't even do
local a = 1
a += 1 -- doesnt work
a = a + 1 -- works```
is it bad im using if and else
ts is like saying "is it bad im breathing air"
😭
using if's is forbidden 🤘
;-;
deviaze what do you think of my script structuring
someone shoiuld make this a meme
this hurts my head
rust is horribly unreadable man
this is probably the worst code in seal's codebase. i think i was giving absolutely zero fucks that day
but getting your code to compile
no this is just very bad code
usually means its going to work lol
rust can be very readable and expressive and much more expressive than luau at times
that however, is just... bad
wym it's amazing
Scripters..POSTURE CHECK
.. it's free and open source
im gonna learn how to srat scripting today should i only use rblx studio or should i aslo use vss
see this is readabel
if you want an oop in rust all you need to do is define a struct and add methods. you can add impls to lots of things. so much more expressive than luau.
xService or yManager names are typically a sign of overengineering. also why is there a Main LocalScript in there
yea i thought the same thing but
NameTagManager controls all instances of the NameTag class (seen as the child of NameTagManager)
then nametagmanager offers functions such as :AddCharacter() to nametag whatever character you want
.. i've done worse
the main localscript calls :Init() which i was wondering if that's even needed or if i should have a single localscript that calls init on all modules
in lua you need to do nonsense like
local insert = table.insert
local remove = table.remove
because there are basically no optimizations for anything and localizing stdlib functions makes calling them faster
this applies to luau too
no
are you sure?
ive benchmarked this before
or maybe that's because i done it with instances to be fair
yeah that's most likely why
this is very nice to know
but
to be fair, hash-table lookups in tables are very quick
localizing math.max is negligable in most cases no?
every time you use . to find an instance in roblox it calls a c function that checks whether an instance of that name is a child of that instance
so it's a lot more expensive than a regular table access or even a regular extern type field access in luau
i'd assume localizing builtins is actually counterproductive for those with fastcall optimizations
stop allocating so many tables
Wdym
check ur micro profiler and see which scripts r causing u to eat memory
and investigate why they r
F9 -> Memory or F9 -> LuauHeap
it should tell you what script is eating the most memory
if you click into LuauHeap then click Take Snapshot
luau is smart enough to fastcall local max = math.max; nice
and yeah that's why you should avoid using string methods unless ur writing a throwaway script or smth that's not in a hotpath
yea i only learned today that luau can dynamically deoptimize code
wdym by string methods
like indexing a table with a string?
local cats = "meow"
print(cats:sub(1, 3)) -- instead of string.sub(cats, 1, 3)
dont do that in hot paths/loops
methods on strings instead of the string library
why is this? i know doing : calls the __namecall metamethod
does it have something to do with that lol
Lots of them are aat 0
Am i llooking in the right placee
did you read whats above at all
did not understand it lol
builtin function calls are faster than namecall calls
keywords that are out of my paygrade
DM me if you wanna buy a cheap Jjba game
Untracked memory is eating the most ram @autumn oyster @prisma shell
where's it coming from
how do i check it
i dontknow
send a screenshot
Which channel
rust is so readable
selling complex movement system dm me for more info
how can i make a touch event trigger specifically when a player is touching it i cannot figure ts out
😪
i've had runaway memory use from creating new gui elements very often and forgetting to delete or reuse them
selling camera script, simple easy and dynamic dialogue system, or a jjba game dm me as well as 48 high quality brainrot models
whats ur code so far
part.Touched:Connect(function(part)
local character = part:FindFirstAncestorWhichIsA("Model")
if not character then return end
local plr = game:GetService("Players"):GetPlayerFromCharacter(character)
if not plr then return end
print(plr.DisplayName.." touched the part!")
end)```
guys i cant join my gamejam game becouse it keeps sayin waiting for an server
how can i force a player to have a 40% chance to have a woman blocky body and a 60% chance for the player to have the basic blocky body
chance = random(0, 100)
if chance > 40 then woman else basic
@summer mantle can u check ur dm?
Ok
perfect, tysm
project manager/analyst dm me
Looking for feedback if anyone could DM
POSTUEE CHECK SCRITPERS
rust is amazing.
Then turn your dms on
how would yall aproach making a shop system?
project manager and analyst here dm if u need anything
Hey
i need some help fixing my script
for some reason it keeps anchoring my character
oh wait
Have a library with your product names and ids, make sure robux price labels are set at runtime and not in the editor, use processReceipt and marketplaceService
wrong chat lol
hm ok
rojo or script sync?
project manager and analyst here dm if u need anything
I personally have found some issues with script sync ending up deleting children instances or clearing script and etc
peak programming form
you eventually become a roly poly if you do it long enough
isnt contextactionservice the same as userinputservice
Cas is input specific and has an action name or something
Different approaches
is it a better version then
local = local ahh
my head is peaking through my legs
Day 6 of learning how to script:
Learned how GUI works and what settings do what like ZIndex, Textscale
Learned text scaling for devices
Made a couple text gui systems
Made the text change whenever you clicked it
Made a text randomizer using math.random + table
Made a currency label
Made a text prompt
Learned a lot of functions such as Focused
ReleaseFocus
FocusLost
ReleaseFocus
Isfocused
HoverImage
ImagePressed
Learned a lot of events such as
MouseEnter
MouseLeave
MouseButton1Click
MouseButton2Click
Learned how to change text colors with scripts
Learned how to change color of text everytime you click on it
do you sleep
selling a decent jojo game and a smash bros template game too
Let's say I wanted to turn text to speech into commands? As in I want to make it so if a player says something, using the new roblox text to speech feature I can get the script to trigger the certain word and make it trigger what normally would be a key on the keyboard, to which an action happens on the game is this possible?
does anyone know if its possible to add drop to raycasts in roblox, for example if making a combat system using it and wanna add bullet drop
i believe you could just angle the raycast down, or if you can use projectiles, add gravity manually
Just learn figma at this point
wtf is figma
Awesome lol
thanks
I’d be on your journey as well but I’m PCless right now
well you can still learn how to script
@prisma vigil how old are u
Worry not about that lol, but I haven’t touched luau in a year
Started when I was 12
Yo can someone help me add a global statistic leaderboard and a top donations / donating leaderboard to my game
how old are you now? 14?
I’m above 16 is what I’ll say
dms
hi
hi
its sigma
bro didnt learn "helloworld"()print 
Peak male anatomy
still dont know what zindex is
😭 😭
it determines what ui objects render above others
so if object A has a z index of 0 and object B as a z index of 1, object B will render on top of object A
Basically layer
oh thats kinda cool
yes quite useful
So the highest number takes priority?
yes
Selling a brainrot tsunami template for 8k DM me
u can find this in the free models btw
no correlation
mb lemme stop hating, go do ur thing twin ❤️
ass
archived like what
like i deleted it
ok
instead im selling a game i actually worked on dm me for more
bro
which game
ball merge game
bro cool ball merge game hell no
Can anyone give some scripts and i try to tell what its going to do?
Not like that
Hey guys im trying to go back and forth with AI and I've been using rblx fo rojo to make my game scripts zippable to give to claude so it can view it as context. Does anyone know any other way I can give context to claude about my game more efficiently?
dm
Does anyone know how to work with webhooks?
me
what if theyre the same
do they z fight or what
itll depend on the order displayed in the explorer
lower ones will take priority
theyre all the same by default
lock in soldier
where shuld i learn how to code luau youtube and dev hub?
what is the roblox blocky male avatar mesh id how do i make it so people spawn with that
40% to join with feminime version 60% with male
i told u yesterday
i figured it out thanks
💔
yo im thinking about on how to make a system to handle multiple tools with their own stats, animations etc. Im mostly a beginner scripter and i wonder on how to implement that feature properly? Should i use local script inside of each tool for detecting player's mouse and whenever they hit something, using 1 script to handle events for these tools and 2 modules to contain tools info and tools functions(abilities as such)? Or maybe theres a better way on making such a system?
for debugging and sanity purposes its better to keep all tool logic in 1 script
you can use tags tho and then assign certain logic to certain tags
what about mouse detecting and such stuff
client side module
like should i put local script into each tool or
you can have system for detecting when tool is equipped and activated
nah
ContextActionService.LocalToolEquipped
also how do i verify the tool? Like so that people cant exploit by changing tools name etc
tags?
dont validate on client
just make sure theres no bugs
then on server check that player has the tool
so one if statement is enough
u can also assign each tool an id or category or name or whatever
to verify
i see
also can attributes be exploited?
like can i rely on them?
for example if i make a damage attribute
client cant change those things
unless u got terrible security
so that it replicates atleast
i mean that i just dont need to verify attributes at all
if its about damage
or such stuff
nah dont need to then
just make sure u got half decent security so players cant change it with remote
do you have any forum about how people exploit with remotes
also its better to keep templates/registry of weapons, for example, client will send weapon name/ID/uniquely identifiable attribute of weapon and then server will fetch stats of weapon and maybe player stats depending on game and then do whatever
just learn how replication works, in short:
the first argument that is the player cannot be exploited
any other arguments can be spoofed
arguments can be sent as the incorrect type
arguments can be omitted
table arguments can contain wrongful data/keys
metatables are not serialized (not possible to send over remotes)
and also exploiters can hook into remote events to redirect their calls
exploiters will do it with client side anti cheats
Hey i need someone that can do leaderboards
hookmetamethod
donation leaderboard and global stat leaderboard
what is the 💰?
no
just say
bro
or dm
also quick question, how do people understand on how to setup projectile systems, and other complicated systems that require complicated calculations
like how do you come up with those calculations
school knowledge or looking for it on the internet or
just research on google
or if u smart enough come up with your own
i can do one
i keep getting ts on my custom type of cmdr
18:27:23.821 ReplicatedStorage.CmdrClient.CmdrInterface.AutoComplete:118: attempt to concatenate string with table - Client - AutoComplete:118
18:27:23.821 Stack Begin - Studio
18:27:23.821 Script 'ReplicatedStorage.CmdrClient.CmdrInterface.AutoComplete', Line 118 - function Show - Studio - AutoComplete:118
18:27:23.821 Script 'ReplicatedStorage.CmdrClient.CmdrInterface', Line 84 - function OnTextChanged - Studio - CmdrInterface:84
18:27:23.821 Script 'ReplicatedStorage.CmdrClient.CmdrInterface.Window', Line 328 - Studio - Window:328
18:27:23.821 Stack End - Studio
https://pastebin.com/E2m9LZ6d code ^^^^
Pastebin
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.
Fully extensible command console for Roblox developers.
That's not a string 🤔
🤔 🤔
What about it?
been working on a rojo tool lately using rust and bouta publish it on my github lol
js looking for feedback
Does anyone know to use GetPartBoundsInBox for hitboxes?
https://medal.tv/games/roblox/clips/lZ5QVQqeiNC1D8eRW?invite=cr-MSxIbTYsODM3MTg5MTQ&v=88
Feedback is welcome
Watch generator blast door showcase thing by minaolenkarI and millions of other Roblox videos on Medal. #roblox
and suggestions of course
Yo guys is ByteNet good?
could anyone explain what :: does iin modules
looking for feedback pls dm
should i use tools to handle abilities in my game or nah
cuz idek
it depends on your game, but assuming it's some sort of battlegrounds game, i believe most don't use tools
oh fr battlegrounds dont use tools???
dont
don't think so
can just fire a remote event to tell the server to trigger an ability slot
so i should
just make gui to display
just make an input controller
the cds
yeah
ye i alr have 1 but my friend was saying use tools
but i wanted to ask cuz hes weorse than me and im a beginner lol
ok ty
np
i mean i usually use the things i learnt from school and add it with trial and error
desmos helps alot too
if you want to use physics to direct a missile for instance then you could use :lerp() or tween on an alignOrientation object, if you prefer realism you could just use inverse kinematics to get angles
its not really that hard once you visualize everything
yeahh mb on that
tho im stuck on smthn, so im tryna make a model of a humanoid, with clothes etc a tool but when i do so, it messes up the movement of player itself, but if i rename the body part of tool as Item_Head etc i cant use clothing etc, any fix for ts?
Client prediction and Lag Compensation :>
Alright guys, it's day 7 of scripting, got my first commission on day 6, which was a donation board, so I honestly can't wait to see what I learn today
do ya'll actually use module loaders or is it just not worth it
and if yes, do ya'll make one or use one
Chat how ez is it To get someones wify password educational purpose
Pretty hard
f
yo can anyone make good Discord server
Hey guys,
I'm trying to dive more into the whole roblox scripting workflow and an interesting question came to my mind.
Do you often reuse your scripts / module scripts in different games?
Do you make your scripts reusable? If so, which parts of game scripting are typically reusable?
anyone want a brainrot template file? where you gt a brinrot and plac it on your plot n make money n stuff, dm me for price it cheap
I've just started writing agnostic code
meaning that I'm making my modules reusable
Imo your scripts dont have to be fully agnostic but agnostic enough to the point that implementing them in another game is a breeze
and this is how my code is structured
everything is grouped by feature
which is the best practice for separating your code and keeping everything managable
this way from another module if i wanted to add a nametag to an instance i simple do
require("../NameTags/NameTag"):AddCharacter(characterIWantToNametag)
I do want to note that if you do make modules fully agnostic you can use Package Links which automatically update the module across all of your experiences which is nice
🤷♂️
bro i think it is this function
local function setupCarryWeld(grabberChar, grabbedChar)
cleanupCarryWeld(grabbedChar)
local grabberHRP = grabberChar:FindFirstChild("HumanoidRootPart")
local grabbedHRP = grabbedChar:FindFirstChild("HumanoidRootPart")
local grabbedHumanoid = grabbedChar:FindFirstChild("Humanoid")
if not grabberHRP or not grabbedHRP or not grabbedHumanoid then return end
grabbedHumanoid.PlatformStand = true
for _, part in ipairs(grabbedChar:GetDescendants()) do
if part:IsA("BasePart") then
part.Massless = true
end
end
pcall(function()
grabbedHRP:SetNetworkOwner(nil)
end)
local offsetCFrame = CFrame.new(0, 3, 0) * CFrame.Angles(math.rad(90), 0, 0)
grabbedHRP.CFrame = grabberHRP.CFrame * offsetCFrame
local weld = Instance.new("WeldConstraint")
weld.Name = "CarryWeld"
weld.Part0 = grabberHRP
weld.Part1 = grabbedHRP
weld.Parent = grabbedHRP
grabbedHRP.CFrame = grabberHRP.CFrame * offsetCFrame
carryWelds[grabbedChar] = {
weld = weld
}
end this is what handles welds
The glitch is when a mobile player is getting carried it’s like it doesn’t update the position , so when the player throws the player or doesn’t throw him at alll , it takes the position from where he was grabbed .
THIS OCCURS ONLY FOR MOBILE PLAYERS BEING CARRIED FOR SOME REASON .
Please help cuz we been trying to fix it for like 5 hours
Thank you for showing me this great example!
I will most definitely try to structure my game in a similar way to yours.
@jovial crown
?
How to fix it ?
bro pinged a random mf with a green name ahahahaha
It literally occurs only for mobile players being carried
sry but i am really busy rn
hi yall I need some help for scriptes for shop ui (scrolling) from dialogue NPC. and getting seeds. can anyone help me with that? (idea taken from Grow a Garden)
hi guys, is there a way to retrieve group sales using oauth?
ive found this api but it requires cookies: https://economy.roblox.com/v2/groups/{GROUP_ID}/transactions?limit=25&sortOrder=Asc&transactionType=Sale&cursor={CURSOR}
OMG BRO LEARNING SCRIPTING IS SO BORING
Ye never provide your cookies to any kind of api
Cookies are confidential
Take your time learning and most importantly try to enjoy the proccess, like having people to talk or script some stupid stuff while learning.
i want to make money
thats why i script
im learning a lot
and i scripted dumb shit before
roblox scripting wont make u that much money unless u actually know what ur doing
making code was never the real job of the actual programmer.
as a programmer your more of an engineer rather than a construction worker
ur job is to design systems, nowadays AI can do a lot of the workload and write code for you
the real skill is being able to make solutions to complex problems and debug to fix problems
well ik what im doing though
and i have everything planned out
I'm sorry but i have to say, Roblox scripiting not only requires assest like effects, animation, ui intereface but you probaly going to need to hire people to help with that and Beside that it there is one way to money
ye solo projects are very tidious
im not gonna be working solo, and i can hire all those people
There is one way which everybody dont like
let's say i make 1k robux per commission as a beginner scripter
IM MEAN LIKE
if i get 100 comms done, that's 100k robux
everything adds up
people say i can do commissions within 2-3 months
and usually requires profillyinh
i did a commission with 7 days of scripting experience
profile service?
true but does only pay put to 5-15 and it takes awhile to see more commission
If you do want quick cash
? What is 5-15
