#code-discussion
1 messages Β· Page 308 of 1
every time you move code out of a function, you are purposefully redirecting your code somewhere else
if its used more than once its completely warranted
but if its only used once, it could be unnecessary
wouldnt it be more convenient if i use comments?
you could
sometimes comments can be untrustworthy tho
just caution on it
(example would be changing a piece of code, without changing the comment for it)
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local shazam = "shazam!"
local Tool1 = "Fly"
local function giveTool(player)
local tool = ReplicatedStorage:FindFirstChild(Tool1)
if tool then
local cloned = tool:Clone()
cloned.Parent = player.Backpack
end
end
local function spawnLightning(root)
local bolt = ReplicatedStorage:FindFirstChild("Lightning4")
if not bolt then return end
local cloned = bolt:Clone()
cloned.Parent = workspace
cloned:PivotTo(root.CFrame)
local sound = Instance.new("Sound")
sound.SoundId = "rbxassetid://821439273"
sound.Volume = 1
sound.Parent = root
sound:Play()
task.delay(3, function()
if sound then
sound:Destroy()
end
end)
task.delay(2, function()
if cloned then
for i = 0, 1, 0.1 do
for _, obj in ipairs(cloned:GetDescendants()) do
if obj:IsA("BasePart") then
obj.Transparency = i
end
end
task.wait(0.05)
end
cloned:Destroy()
end
end)
end
Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
if string.lower(message) == string.lower(shazam) then
local character = player.Character
local root = character and character:FindFirstChild("HumanoidRootPart")
if not root then return end
spawnLightning(root)
local findTool = player.Backpack:FindFirstChild("Fly")
if findTool then
findTool:Destroy()
else
giveTool(player)
end
end
end)
end)```
i hope this is what you meant by making the effect its own functiojn
just a point of maintanability, you should utilize dictionaries with commands as indices and functions as their values, so instead of the long lines you can just do
local commandFunctions = {
["shazam!"] = function()
-- insert code
end;
}
-- then inside ur code just do
local command = commandFunctions[string. lower(message)]
if command then
command()
end
so basically js making the code for shazam its own table
by doing this, you can support multiple commands incase you ever want to update it while avoiding long if statements
interesting thank you ill use this now and in the future that way i dont waste time π
the easy part is don now i js gotta make my own fly tool, animations i might make it clint sided and organize
whats the best website to learn roblox code and LEARN the code
yeah i knew yall will fucking ignore
What do ya think is the best way to design code
i just wanna make it known for @lethal yoke that you should only do this if your writing modules typically, unless your handling functions for individual objects [example if im processing individual functions for products when purchased] otherwise its just unneccessary
depends on exactly what you are working with
also do what @upper jay said for the tools here, it will make it more maintanable
are animation markers reliable?
yes
there's not a "best" way. but there are general principles in the form of acronyms you should follow:
- DRY - Don't Repeat Yourself
- KISS - Keep It Stupid Simple
- YAGNI - You ain't gonna need it
- basically dont make something in advance to just end up not using it. only make it until you actually need it
there's a ton of acronyms like this that you could search up
- basically dont make something in advance to just end up not using it. only make it until you actually need it
they just describe good programming practices
DRY is very good, its one of the reasons you wrap code in functions
ie, to avoid code redundancy
another reason for functions is to label sections of code so you (and other developers) can hide the implementation and can easily skim a script if you only want to know "what it does", not exactly "how it does it"
sup sigmas
aye aye, it really depends on ur usecase. usually you'll really just use functions
though personally (for a command system), i would have seperate modules per command because it deals with code separation better than function dictionaries
its a mentality to keep in mind while ur coding
guys how much would this sell for?
KISS is what im struggling at I think im ovring it
not too familiar with KISS but it might be like ocrams razor, "the simplest solution is often the correct one"
in programming, you should strive for readable code and, as much as possible, straightforward solutions
prioritize developer experience (implies readable code) over performance
exception of hot loops, or code that you expect to run every frame and can be expensive. in these scenarios where performance matters, its fine to sacrifice readability
1 million
aside from the first 1 the others r kinda bs
Is there multiple ways of making separate characters like a battle grounds game?
Is there a way to make sure no player can "No Stun" through my combat system? Or is there a way to prevent players from no stunning and make players unable to bypass it?
My best answer as of currently is make a table for it
Can't the player change their speed and all of that shit? I want the player trying to exploit unable to get himself off stun or increase his own speed, etc...
Im not gonna lie im just as clueless as you twin π
sanity checks duh
If your system is validated through the server (which it should be), just make sure impossible behavior is never replicated
you can make the exploiter powerless by setting their character's network ownership to the server, but that adds tons of latency and ruins the experience of everyone else. what you should do is let them keep the network ownership. this way, they can change their speed and whatnot. but since these changes replicate to the server, you can write basic anticheat to listen for these changes and kick the exploiter since a normal player should not be able to no stun or change their speed. other changes like them instantiating parts do not replicate to the server and usually don't provide a gameplay advantage
People with scripter role, what was your application project? Im uncreative asf and just thinking about script, that has more than 200 lines while showing that many required stuff...
And as "merging modules to one script" is not allowed, I have no idea what to create for that π
Optimization (just skim through the code and see if it needs to be changed)
Attachment/loadout UI (like phantom forces and mecs)
Add a few guns (most likely 2 max might change later not sure)
(we might ask you to do other things in the future surrounding the gun system which we will pay you to something we agree on)
What should I charge for this
..that's weirdly useful, thank you
alt + d
is it better to learn scripting then make a game,or learn scripting while making a game
Make little projects
Like little minigames and shit
aha
Make what you find fun
Stupider is better
Could someone tell me were I could read more indepthy about the game "REPO"'s NPC AI system? Or any good articles about advanced video game AI NPCs, preferably with vision.
I doubt there are any articles directly about Repo's ai system but from what i know you could use distance between npc and player and also raycasting in directions you want.
Do you happen to know what framework repo used?
Did they ever share that?
Has someone reverse engineered it to figure it out, or something?
Go read up on Finite State Machines
on roblox most implementations for "vision" don't really detect through vision, they usually just run an AOE detection and then use raycasts to make sure they have actual line of sight to the player.
Is that why they used?
Agree on raycast, easiest way
It's a common framework for AI that have multiple actions such as walking around and chasing players
so I'd guess they probably use some sort of FSM
Is "AOE" the method that checks if the player is within the NPCs field of view, or visual cone, and then ray cast for obstructions?
AOE is more of just an analogy I used to make it understandable
you could run a detection loop on the server
No, wait I mean is that how you would use AOE detection for npc vision
i.e. the npc runs a loop where they detect players within 100 studs, then if a player is inside of that they raycast to detect if they can actually see the player
I have a script to ragdoll characters, the problem is that after the ragdoll is over, sometimes it paralyzes the character while it's sort of ragdolled but paralyzed, for maximum 2 seconds then it stops, doesn't happen always though, how do I fix that and prevent it from being paralyzed right after ragdoll?
doing a getpartboundsinbox sort of approach may work but I don't know how optimal that is
But that wouldnt account for whether the npc is facing the player
I mean for a circle it's probably easier to just do a simple distance check
Magnitude
Yeah true
you can add another check for that then
ive heard someone say dot product or cross product or something but idk the math to check cone of vision with it
Maybe, I could check if in range, then check if they are in the cone, and then finally raycast
just add another check before the monster agros from the raycast detection
yea
with ai detection just be careful because they can get unoptimized very quickly if you're not careful with it
but implementation wise it's pretty easy
is the behaviour tree framework better, in this case?
I wouldn't recommend relying too heavily on prebuilt frameworks (though they can be very useful)
unless a framework is very very popular people won't generally know much on it
You donβt need finite state machine
Iβve created AI
well not fully AI
not the ones Machine Learns
But I will implement using DeepLearn
all you need is a Set and get
watch the state listens through a function that you attach with
Or even better just use Signal to listen to it
the behaviour tree framework is quite popular, and that may be a understatement
Tbh i dont even know what a framework is can you explain to me?
"'finite"
a framework is either a module or guideline to follow for implementing something
for example the profilestore data module
it can apply also just to rules someone follows, like NIST's security practices for businesses to follow
it's not very rigidly defined
What is this LARPing!!!
It's a DFA!!!
and what is a tree framework then?
tree networks tend to be like branching paths
like family trees
if you've seen those
ah
I need help with ragdoll paralysis issue.
I have a script to ragdoll characters, the problem is that after the ragdoll is over, sometimes it paralyzes the character while it's sort of ragdolled but paralyzed, for maximum 2 seconds then it stops, doesn't happen always though, how do I fix that and prevent it from being paralyzed right after ragdoll?
Kind of just modular structured code, more basically just reusable and and organized. Which makes it easier to expand upon and use when coding
Oh i've done that already
It's just like a tree thb.
So there are different points called "nodes" and these nodes are bits of code.
At the beginning, the top node runs first, this node then has children. The result of the code determines what child runs next. And so on
That's about it
And also, each node has a fail result, and when this is returned it restarts
and goes back to the top
to restart the tree
I don't think that's the best option for this case because it would get way to complex and hard to scale
I'm think I should maybe use GOAP or the Behaviour Tree framework
Maybe GOAP is unnecessary for my purposes, I just think it would be cool to try
For simple AI, when is it better to use tree fw over state controller?
yo guys one question how do i let a non normal character display an animation when: running, idle, walking
Like Finite State Machines?
Yeah, however you call it π
if im correct you need a humanoid inside the part you want to display the animation
i mean i got a model and the animation should be for that model but idk how to make it do smth cuz the animnation doesnt have a animation id or anything like that
you need to publish it
You have to publish the animation to get ID
lemme try
Well, its depends on how many, and complex, the actions you want your AI to do.
If, for instance, you were making a simple zombie AI that only checked if the player was in range then chases and then, if in attacking range, damages the player. then you would use a Finite State Machine.
However, because you have to check the state each action (like if the player is in chase and attacking range, and if chasing), you can imagine that this would get impractical for larger and more complex AIs. So that is when you would switch to Behaviour Trees, or something else.
Okay thx for great explanation.
DFA!
Isn't that just the formal name for Finite State Machines? in the context of game development of course.
It's the correct name, Finite State Machine doesn't even make sense
I dont know much about that so idk, please inform me!
Since State Machine already implies that there a limited number of states.
And deterministic finite automaton does?
Oh, wait, yea, it does
Putting "Finite" infront of it is, trying to sound fancy when you don't know the correct terms
More than Finite State Machine at least
It's due to people larping
Some kids new term
slang π
I see it everywhere and dont even know what it means 
Google doesnt even know
Live action roleplay, wtf
How does it imply that?
See it as someone is imitating something they're not
Okay so if I say I have Porsche am larping (as rich guy) ?
Ah, okay. I guess that makes sense. Is there a reason why they call it "larping"?
Since you can't have an infinite number of states, else it would be a turing machine or well turing complete technically..
Pretty sure if you have infinite states it contradicts something.
But yeah, by definiton all state machines are finite.
Humans are definition of infinite state machine
It's a euphemism for calling people full of shit
Yes and no.
If you believe souls exist
then yes
if you don't then no
You should be able to create an automaton that can replicate a brain
just made my first code
Oh yeah, true. Didn't think about it that much
Well, if I had a machine that adds the number one to its current number, and you use state as in the condition of the machine, then it would have infinite states. So...
Halting problem
IT philosophy 10/10
You can say that, but you can't prove it
What?
It would "halt" after the calculation, which is correct
The halting problem is a fundamental, unsolvable problem in computer science, proven by Alan Turing in 1936. It asks whether a general algorithm can exist that determines if any given program will eventually halt (stop) or run forever (loop) on a specific input. Turing proved that such a universal algorithm is impossible.
but also..
I knew what it was, I just dont see how thats relevant
no,
for it to have infinite states, it would require infinte time
which isn't possible..
No it wouldnt
How?
Computers can't even create truly random number, defining infinite is impossible, so it doesn't exist
That's how infinity works
Do you know what they mean by "states"?
Yes if you're creating a state, the act of creation is still something that must happen
and to have infinite of them
it'll take infinte steps
aka infite time
Well infinite is defined, so go figure
And if you disagree with me, you can go write a thesis and become world renowned π
Well what is random???
Going into meta-physics fr
In simple definition I would say A number that is chosen based on multiple selected factors.
But it's just pre-determined!!!
Yeah true random doesn't exist
Ngl, randomness is just a lack of information
Oh I see where you are coming from.
The word finite in the name means that it has finite states
We had to implement primitive random generator High school, it was fun
And the definition they use is limited
That's it lol
They mean the there are a limited amount of states
If it was not "finite"
Aka, infinite, they would have an unlimited amount of states
or without bounds
So it just means that it has defined number of states
So technically speaking, creating state machine with AI that can determine unknown state and create new behavior state based on environment would be boundless state machine.
yes
Hold on
The turing machine has infinite states
Since it does not stop, it continues for ever right?
It has an "infintely long tape"
but not infinte states
You can use the tape to make as the states of another one
but for it to have infinite states
that'll will require infinte steps
aka infinte time
How many times do you need do add 1 to reach infinity
You cannot "reach" infinity, its like saying how long would it take to reach your current number plus one, provided you check this goal every time you reach a new number
How many states does the turing machine have? Is it possible to calculate?
Space is Infinite,expanding, so this could be Infinite
Go watch computerphile, I don't think you understand what a turing machine is.
what
infinite nothingness is just nothing
You 100% dont know what that word means 
Allow me to enlighten you, this is its definition:
"Having no boundaries or limits; impossible to measure or calculate"
Now, do you see the problem with your argument?
Yes I do bro π go do some actual academic research insetad of just googling
here are some more definitions to be consistent:
"Existing beyond or being greater than any arbitrarily large value. "
"Immeasurably great or large; boundless. "
So these definitions are incorrect, you are implying?
Actually
Wait
Let T be a turing machine with the largest amount of states denoted by M:
Create a new turing machine with M+1 states, but M+1 > M thus there is no turing machine with the largest amount of states
Holy moly, he figured out counting!
and by definition a turing machine has finite states
So no, there are no infinite state machines
.
Yall i am making a jujtsu kaisen rpg game
Yes
Your conclusion is illogical.
And it will be long term
@odd pier Go read it from the man himself:
https://www.cs.virginia.edu/~robins/Turing_Paper_1936.pdf
That is to do with something completely different
No
you don't understand mathematical logic
Are you trying to say that the field of computer science has been wrong for the last 100 years?
Or that the greeks didn't know what they were talking about when they formalized logic
At some point you need to accept that you're wrong.
If you disagree with this I promise you if you can build a logical argument and publish it you'd be world renowned since that will change basically everything
Wait, let me show you were you make illogical conclusions. And why a machine with infinite states exist. Give me a second
go argue with chatgpt, I don't have time for this π
joijoij
wait() >>>>>>>>>>>>>> task.wait()
when you say states you bundle the tape's state into the machine, when he says states he only looks at the mconfiguration
both of you are right you are just miscommunicating
We are talking about machines in general, not just turing machines
what was the original context
Does a machine with infinite states exist
And more further back, does saying something is a machine imply whether it has finite states or not
and by states do we mean the states that control the behaviour (like the program) or do we include the "memory" if it has any
and by exist do we mean exist mathematically or in reality
By state I mean condition/the main definition. As for exist, I mean mathematically.
here you go sparkleking https://en.wikipedia.org/wiki/Transition_system
In theoretical computer science, a transition system is a state machine that may have infinite states. It is used to describe the potential behavior of discrete systems. It consists of states and transitions between states, which may be labeled with labels chosen from a set; the same label may appear on more than one transition. If the label se...
like a simple example of what could pass as that is an infinite graph and you use the edges as the transition function
Yes im ass at coding hi
we know
Wiki is bad at explaining these types of conceptual/mathematical ideas. Is there somewhere else I could read about this system with more explanations and indepthly?
Shut
Hi Garden Life
Formally, a transition system is a pair (S, T) where S is a set of states and T, the transition relation, is a subset of S Γ S. We say that there is a transition from state p to state q if (p, q) is in T, and denote it as p β q.
this means you have an infinite list of states, and a list of possible transition between states
pretty much it
hello boss
if you know graph theory it is basically just a graph but you interpret it slightly differently
Yeah, but this doesnt prove it
the existence of infinity is an axiom in set theory
this doesn't need proof
nothing there needs proof
it is just a definition
even if infinite state machines weren't defined in the literature there is no reason you couldn't just define it
oh ye right, you prove the implications of the definition
yes
I think the main problem was that the other guy was saying that you would have to define each state which would take an infinite amount of time. But by definition if you were to, it would then become finite.
But you dont have to define each state of a machine for it to exist
mathematics and theoretical cs is less concerned with computability
most things can be described with a rule
i can define an infinite set in a sentence it doesn't matter that i can't actually write it all down
even on a computer you can define an infinite state machine by not enumerating all states till you need them (supposing you have a computable rule that defines them)
ya, exactly
yeah sometimes this works best too, it all depends on what the project is
Should I use BehaviorTrees3 for, well, as my Behaviour Tree framework, or should I attempt to create my own?
Can anyone here help me with the favorite game prompt? Did roblox scrap it?
use game id as item id
the item type should be Asset
to detect if they actually do it use https://create.roblox.com/docs/reference/engine/classes/AvatarEditorService#PromptSetFavoriteCompleted
What's the difference between an apple and a pear? One's red and one isnt
.
how much would i cost to code something like epic minigames appx
$2k usd
@ember nimbus how much would it usually cost to code something like epic minigames but like 4-5 games
1.5k usd
only 4-5 games
i'm not capitalist
My budget for my game is $10k
my budget for my game is 0
games
coulld u like give appx u like like a pro
could probably make that in like 2 weeks
appx pricw
not including building and ui
1k
id save tht much up for coding
or less
i expected lower
yeah u could get it lower
i thought a simple game like tht costed 200-300$$ im doomed
full completely inventory system
u can get it for that
but its usually template so that means they will sell the code to multiple people
no so i have an idea people told me i can say its similar to epic minigames but like only 5-6 games right how much would it vost to code appx
yep but he can also make a simple game with this budget cuz its "simple"
a lot
200-300
but its like rlly simple games is 200-300$ enough?
yea
like mussical chairs and stuff
yea shoulld be simple
ok so my goal is to save 500$ now , 200-300$ codin , 100$ ui and building , 100-150$ ads
i give myself till the end of the year to collect tht much
lsgooo
my king don't do roblox dev
whyy
think about the numbers
u dont need 100 on building and ui
and u dont necessarily need 100 on ads if the game is good
the better ur game is the less money u should need for ads
as in
how many people are in this server vs how many front page games there are
ye so i released the same game like 3 years ago spent like 10000 robux on ads gained 1k active players than the code broke didnt have funds to fix it but game has potential
doesnt mean much
either front page games have 1000 people working on them or 99.9% of people here don't get anything
maybe u shud learn to code then so u can fix the game quickly if there is a bug
isnt tht hard
kinda
ill do the building myself tbh
but if u want to learn then most people can
1k active???? from only 10k robux? bro ill spend like higher than 100 or 200k to get that number
ye its a very good game tbh im rebuilding it now
but again tht was the audience from 2-3 years back think of the things now now the audiecne is way less advance
can we have some more convo on this
no it's better not less
and
its rlly a life decision for my future
its not just about getting the game out there but updating to maintain players
Nice call out. We're testing algorithm improvements to ensure games that retain players long-term can be discovered by the largest possible audience. More soon.
so ur gonna hvae to constantly pay other devs to do your updates
if they get lazy or quit then ur game is gonna get cooked
brainrot era is over π
see how old are yall first tell me cause tbh im 19 in india where the avg salary is like 1000$ a month tht i so low and i feel pursuing game development can help me beat tht way better
is it\
not really he can hire them per task
there are three parts to roblox dev, having the idea, executing the idea, and maintaining the idea
nope
the idea is luck
idk
execution is skill
then a bit of luck in popularity, but you can bundle that in with the game idea luck
ur whole business is founded on whether random guys on discsord will do the work and do it properly
maintaining the idea is probably something people either have or don't
the average salary in india is not 1000 usd
my average salary is like 100 - 200 dollars
well ive grown around people with a lil more 3000-4000 but they are family businesses and i wanna break the cycle
by maintaining the idea i mean keeping that momentum of popularity going

be hoonest do u think roblox dev is realistically a good idea to pursue ive earned like 1k$ till now from roblox dev but idk now
how it is
if u can solo dev its good
and im giving myself a whole 6-7 months to clear it out
I can place backup devs and finish two updates simultaneously so that if something happens to them it won't break the project
Its really just about where you grow up
/ live
ok
i do that btw
i wouldn't bet my life on it
wouldn't pass up opporunities for it
ye i agree but i want to have like atleast 1k$ per month to show tht this has potential
if you have a family business as a safety net in case it doesn't work out sure give it a shot
true
most people don't have that
if you're not sacrificing anything to do it give it a shot π€·
i've seen people who don't do uni cus they wanna be a roblox dev
terrible idea
but if you're not gonna do uni either way
tbh my profile is shift i am doing bba from the like top 5 from my counntry but than its bba i have like a bad 7.8/10 cgpa idk and like i wanna d something in life idk what to
im gonna do uni ofc
i am alr doing undergrad
but i have to odo masters too
u go from tht 300-400$ avg slary to 2k$ salary by doing masters here from a top university
finance
if you're in that top uni bracket don't do roblox dev
i will be in like the top uni bracket if i make it to an iim tht is 0.05% acceptance or less
ive done it for undergrad im in like the 3rd best or 4th best but
for major idk
if im ready
you study hard?
dms
i am start i just stopped studying tbh i have like a 7.8 grade even without studying a bit
but ye whats called goos is 8 above
good is 8+
if you're top 4 no studying it's a safer bet to study and get into one of the top unis
if you do roblox dev you're splitting your priorities
your right and tht is why im so confused uk the job id be majoring for is what comes under replaceable by ai and stuff plus i wanan do soemthing of my own
ok if not full time hows aprtial or half time
how long would it be till you would apply to the unis
cus if it's like a year i'd say lock in for a year, try get in
roblox can wait uni stuff can't really wait
this year or next i have the option by my parenst too choose they told me if i wanna risk on roblox they can give me an year
true
next year would you have the resources you do at uni?
like lecturers and stuff
and also course content
cus if you don't it would be better to study rn when you're studying it anyway
if you made roblox dev work this year there's no guarantee it will keep working that's the main problem
yes truee
uni will give me a cushion to experiment
but the thing is i most probably would have to do a 9-5 for like 2 years for the portfolio
roblox devving and working hard in uni shouldnt be mutually exclusive
would say if you are going for a full time position somewhere itll be hard to manage both
priorities priorities tho
How to dev
What should i prioritise
Do you per chance have an invite link for rbxcli?
Saw you talking about it.
Hey, I am trying to make a case unboxing game based off CSGO, trying to do the final tweaks of the 'roulette' part, but I can't quite quite the audio to sync on the slider. The tweaks I have tried have made the audio go on for too long, or too short, sometimes sped up / slowmo.
Anyone have an idea about to go about this?
use sound stop when a spin is done/start or something like that
do you think it'd be better to do like a full 8 second audio clip, or something like a the 1 second click sound, and then the 'final' audio transition where it stops?
you have to create events like when the wheel is started a sound plays on and when the wheel goes 50% then the previous sound is Stop and then start the new sound immediatly. and when its end you play a victory thing or loss sound depending on what the player got. According to my information i think this should be the case
On an account of mine that's verified with my mother's information, I don't even remember why I did that.
If I create one now and put in my information, and verify it, and if both accounts are on the same IP address, will that be a problem?
no
unless ur evading a ban or smth
i want to create a fire extinguisher very similar to work in pizza place one
anybody knows the logic behind it? or some tutorial
saved me ty
Tag fire parts when extinguisher is used make a hitbox that checks partsinpart for parts with the fire tag if tag == fire destroy.?
you tag the fire parts, then when the extinguisher is used you create a hitbox in front of it that checks for parts inside it, if it finds parts with the fire tag then you remove or reduce the fire, so it basically detect fire objects and turn them off when hit
oh
i need to use collectionservice to find tags right
Yeah.
thanks
oh interesting never thought of that
i do
π§ππ«
π€¨
This actually made me laugh so hard
whats the pay
dm
best opioid for coding?
adderall
you can just use an array maybe
FUCK NO π
why no
external api then
im sure theres a github json file that covers a lot of words, you can just use httpservice to read that json
voila
found one
awesome
that's what he was asking for π
heloo guys
i js type casted the table containing the function to any
i am NOT dealing w that
For ppl that uses math.lerp over tween, Why?
its better for real time updates
could you give me an example? Not really sure what you meant
well what are you gona use lerp/tween for
cuz for texts usually using lerp is better imo
im not using it yet atleast, i just came across a video talking about math.lerp, and i realise ive been using tween alot instead of lerp. Since it was something i use alot when i was programming in Unity
well using tween is okay
like a typewriter effect?
wait no mb
i meant like
usually i use lerp for like live updates like for torso tilting, value that progress on a ui text etc since its better than tweening it
sorry im still having a hard time understanding π , but why is it better than tweening?
I guess ill send you a thread about lerp
sure thanks alot
when im using promptgamepasspurchase it keeps saying i already own it is there a way to test it so that it actually prompts it
why
you can use clients and server mode to test
chat how long does it take to learn scripting?
what level of scripting
idk man but u wanna learn tgt?
it takes 1 week to become an absolute beginner
1 month to be a beginner
5 months to start leaving beginner territory
but
everybody is differtent'
im actually planning to learn it during the summer lol
i made a clicker simulator in my first week, just the base frame
alr man, whenever you're free ig
idk rlly, starting from basics ig? idk much scripting
There isn't a set time on how long it takes, but from my experience i feel like whether you have computational thinking might help you learn quicker
i alr know java, is that a good starting point?
imo once you know one language you already got the basics down. Now you will just have to transfer your knowledge over and understand the syntax of lua. its always a plus to know another language already means your already ahead π
bet, thx dude
anyone know how to despawn any object on the conveyer belt system
i have added some transparency. its not very efficient right now but i will improve it eventually
hot take but
i personally think optimizing for clean code will get to a point it will be comparable to that of spaghetti code
thats why i mess up my code so even i cant read it >:)
whay could this be
guys how to stop studio from making my mouse just not be able to click anything
How hard is it to learn luau if I know Lua?
not that hard since most of the syntax is the same. You would just need to learn methods specific to the roblox engine
Re-making Sailor piece's Garou moves in my style!
Scripting, vfx and animation(yes theres a animation lol) By me
Sound Credits:- Found on toolbox
#roblox #robloxdev #vfx #robloxvfx #scripting
You could make a really scary horror game with this.
What do you use this for?
once its finished (if i can finish it) it could be pretty much used for anything. I am planning on making it open source
i dont really plan on continuing roblox development after but i may make a little game with it as a showcase or something
Why is that??
Did you learn it just for the purpose of creating this?
nah i learnt luau on the side because it was an easy language to mess around with. I am planning on just continuing C# or Lua and maybe other languages if i get into cyber security
may i ask why?
What do you think?
yea, it was kind of a stupid question mb
If you are seriously looking for a scripter maybe make a post in #scripter-hiring
local function Greedy(posData:{position:Vector3,size:Vector3})
local n = 0
for i,data in posData do
for j,data2 in posData do
if i == j then continue end
for _,vec in {Vector3.xAxis,Vector3.zAxis,Vector3.yAxis} do
if data[1] + vec*((data[2]*vec).Magnitude/2+0.5) == data2[1] then
n += 1
data[1] = data[1] + data2[2]/2*vec
data[2] = data[2] + data2[2]*vec
table.remove(posData,j)
end
end
end
end
if n > 0 then
Greedy(posData)
end
end
cheap greedy meshing code π₯
nah
Pretty sure this bot is here for a reason kid
(Don't mind the fact that i blocked him)
greedy
Idk how I can move platform where people stand on them and it moves with them
smth about constrains maybe?
solve it with constrain...
local inputs = {} :: { string }
local outputs = {} :: { string }
for index, key in inputs do
outputs[index] = key
end
-------------------------------------
return function ()
outputs = table.freeze(table.clone(inputs))
end
luau is almost identical to lua
If you have 5 years in Lua then i would say it would take like 1 year to essentially master the roblox API and how to develkop on roblox
Mo
There is a βuβ at the end
So not identical
im not falling for this shitass ragebait
Luau is very easy if you know Lua, it almost same with small changes like types, Roblox API, and extra functions, so you can learn it very fast.
why ur shit pink
didnt discord change it
from red to pink
with lua
fr
ro
Better to learn Lua or Luau first?
LuaU, the difference is negligible.
Start with Luau, it same as Lua but made for Roblox, so you learn faster and can use it right away.
luau
Alright thanks everyone, much helpful than the other server criticising me for asking <3
|| holy shit is that pinkpantheress ||
np
yup
Where
same
Yeah
DAH
DAH
poh tay tow
Re fan
Feels like a million bucks.
Dead server
anyone have free courses key word π
New addmission open
BaisVeriance "Luau" classes open.
Qualification; 2 hands and a brain required.
Fees; 200 dollars until I make you a full scripter.
if anyonme could teach me for free
Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.
are you guys having problems with script sync too?
if you make some changes in edit mode they simply dont apply to playtest
guys does debugging cause lag
what
nah it doesnt
bruh
bruh
banned
14k
more than me
u cant sell stuff?
sorry ghost hacker i dont wanna get on your bad side
π i was js asking cz i was thinking of selling animated models i have
does anyone know how i can get acess to tester hiring
just click on it
like i want to get tester lol
cool, do you like butterflies too?
https://vxtwitter.com/SunDevelopsVFX/status/2048115766776717617?s=20 go show some love 
Cosmic Garou Z,X,C moves by me! like and follow for more! <3
#roblox #garou #robloxdevs #robloxvfx #anime #opm #sailorpiece #VFX #RealTimeVfx #vfx
Long time no see
time long see no
tung tung tung sagoon
guys my problem with learning roblox scripting isnt coding concepts but the syntax like how do i learn this. like no videos online teach you why or when to sue "parent" or other words. like how am i supposed to know what to write to create a for loop or stuff. videos teach how to do them but i want to know the dictionary, not like memorzing sentences
roblox documentation, they contain all the syntax uses
Luau is a small, fast, and embeddable programming language based on Lua with a gradual type system.
How do you recommend learning all of the syntax needed for fundamental scripting or beginners, do I just read as many as possible
just mess around with the syntaxes that you come across
merely reading it won't be effective
but yeah definitely go through the docs and this
will help a ton
just script
Frontend
how'd you do that
what
the text animation
We use the TextLabelβs MaxVisibleGraphemes property and increase it from 0 to the total character count one by one with task.wait(0.03)
The full text is already set beforehand; weβre only animating how many characters are visible
If youβd like to see more examples I can also send you a small selection of some of my other past work for inspiration
oh nice, never knew that was a property
sure
That won't do the animation of the characters appearing from up
How much u make a month with scripting?
?
is it alr to ask how much you make weekly as a lead dev?
You can try it and see for yourself Thatβs how I made it
Yes I tried, it just makes the characters appear
0
why
yea your right MaxVisibleGraphemes alone just shows the letters in place for the drop effect i move each label position a bit down like +UDim2.fromScale(0,0.15) and set TextTransparency to 1 then TweenService moves it back to the original position and transparency 0
so the typewriter and the slide/drop effect are 2 different animations working together
So each letter is a seperate text label
that was my guess too
no in our case the whole label slides down as one piece and MaxVisibleGraphemes just reveals the letters inside it
if you want every letter to drop by itself then yea you need to split the text into seperate TextLabels like one label for each letter and put them in a UIListLayout then tween each letters position and transparency one by one with a small delay
@real dagger
yes
how u make 0 money with scriptingπ

@unreal nest how long have u been scripting for
3 years
every day?
yeah
crazy good, you make ur own games or like freelance and work for others?
The game I showed is the one weβre planning to release soon with 3 partners. We have 2 scripters and 1 asset developer. Besides the asset work, weβre handling pretty much everything ourselves So yeah I do work on my own games too, but right now Iβm looking for commissions in script hiring so I can upgrade/replace some of my microphone and keyboard parts
fire
cool
thanks
thanks
thanks
your frontend capabilities shine, so smooth
awesome progress for consistently coding for 3 years
for the spirit of showcase, ill send something here
volume warning
unfinished because i ended up doing a refactor of all the code, but this is one of the several "minigames" ive coded for this game
looking back at this again, yeah this is experienced work. seems like youve been used to finishing full-fledged games which is something not everybody gets to do
job well done
Guys how do I turn of the stupid script debugger on the new studio ui
Itβs so annoying
Youβre insane this is crazy It looks really good great work.
gashdahd thank you!!! yours too dude
would u mind if i added ya (on discord)? you seem really interesting
Someone please help me
have you ever made a trading system?
No, I havenβt made one before, but Iβm confident I can build it
edit ahh music
i js wanna know how theoretically possible something is
cuz ik itd be hard asf
i was wondering if i could discuss it with sum1 in dms
jesus christ thats loud
gshggg my bad
π
hi is this how you're supposed to print in luau?
idk bro doesn't seem like it
if it works it works lil bro ur doing not good
ty for thius
tf are you communicationing to me?
neattt
guys for those who know, if i handle rarity spawning on the client is that safe or can that be exploited
I would handle that on the server.
Are you saying the client handles "choosing" the rarity of an item that the player gets or something?
like im spawning lucky blocks on the map but i want it to be only for that one player, how would i do that if not all on the client
You could handle the spawning of the blocks on the client with no problem, but I'd have the server tell the clients which blocks to spawn and have the server keep track of which blocks each player should have in their field
store all rarity values and other things on the server and just spawn the lucky block model on the client
Hey how would you guys determine if someone's code was AI? Or their comments?
That really depends on the context. There's isn't a 100% accurate way tbh.
I figured as much i was trying to do my application and a friend of mine said my comments looked like AI and to not submit it
yeah there isnt a way to tell for sure but in my experience AI tends to take some weird paths to solve something
As long as you know it's not AI, and you can back up your work with logic, then I wouldn't stress about it.
you'll just have to be wary cuz other scripts could fail
Wdym?
i mean they could submit the most polished advanced scripts and when they do smt for the game the scripts suck
Thank you i was feeling very conflicted
I mean, sure. But that has nothing to do with AI.
it does cuz... ai cant just handle for you everything unless you somehow manage to make it to
Well, of course. I don't think anyone rational is relying solely on AI to make their code---that'll never work since there are too many directories.
At least not for Roblox.
wdym
i do that
Yikes.
but it made me save months of work in making AI in roblox
how you expect me to write all this in a reasonable time
with ur fingers
u know thats not how it works
a keyboard
how do you press the keyboard keys mate
with my muscles
i hope you rot in hell
no, u
sure bud its okay
i hope u get gratified by critizicing the opponent and not the argument
can you dum that down for me
no
hope your pillows are warm
coducemtnation?
by reading
what ur trying to do
Im just trying to leanr in general
ye but u still need a target
Well im building a tycoon game rn
ur not just going to learn random functions and stitch them together in a whole code
Im learning how to make a rarity system
u should be looking up the docs for what ur trying to learn in that moment or what you wanna learn in general
same tycoons are so tuff
k, like you open a chest and then based on rarity some appear more?
No so I have these items
lets just call them frogs
and each frog has a different rarity
WITH DIFFERENT MONEY
like a number and the higher it has less chance
sorry caps
basically yeah
k lemme try doing something
I thought I should've read up on syntax
can i see
thats not good
would anyone else recommend the microwave method for crack smoking during coding sessions? ive always found it difficult to spoon cook while keeping focus (takes me 4-6 minutes usually). at this point ive stopped cooking during sessions for the most part and just code in 20 minute increments. other people on here have told me it only takes like 20 seconds and comes out super smoothed using the microwave. im afraid of ruining my soft and my shot glass. i also ran out of baking soda but i have ammonia and i dont know if the microwave method is specific on freebase. i have about 2g on stand bye so i guess id still have some if i fuck it up the first time, the bigger issue would be getting the oil over the inside if it boils and explodes all over the microwave, i live with my mom and she recognizes the scent, i wouldnt be able to wash it out
i ain readin allat son
i personally like to just use a frying pan
function choose(choices:{{Item:string,Rarity:number}})
local sum = 0
for _, v in pairs(choices) do
sum += v.Rarity
end
local num = math.random() * sum
local n = 0
for _, v in pairs(choices) do
n += v.Rarity
if num <= n then
return v.Item
end
end
end
im more annoyed that you posted a text wall than what you actually put
im not that good of a coder with general things
no
why pairs
muscle memory
remove it from your muscle memory
n why not
pairs and ipairs shouldnt be used
live action role play?
general iteration allows you to just put a table
e.g.
for i, v in tbl do
--
end
ipairs is sitll good
not really
fym π₯
ipairs is a slower version than a for i loop
Not anymore
or while true with a +1 counter
so u can use it if u want in order
how is it micro optimizing
i tought u meant
function choose(choices:{{Item:string,Rarity:number}})
local sum = 0
for i=1,#choices do
sum += choices[i].Rarity
end
local num = math.random()*sum
local n = 0
for i=1,#choices do
local v = choices[i]
n += v.Rarity
if num <= n then
return v.Item
end
end
end
its literally quicker to type without pairs/ipairs
for i in pa(
thats what i write
lit 2 letters
then autocomplete can do it
you also have to type the table's name inside
or you can just type the table's name
but you still have to type the table's name??
what if i want to use a custom table reader
??
it returns an iterator function
battle of the larp
I dont even know what your arguing anymore
I dont want you to recommend something outdated and unnecessary to a beginner
Wym thatβs not good
?
Even though I loved this all I know is this created a for loop saying that you go through the rarityβs and each one is a different number and itβs random
I might gts and wake up
And get back to scripting
the idea is
you make a region for each item
you make its size rarity
then you choose a random number
that number falls in a region
you choose that region
smaller regions get less change, bigger regions get more chance
WUHE
do you want this or bigger number = rarer
Why wouldnβt I just make a list
And go through that list
And print it out as that
Yk
???
no
werent u trying to choose a random
we dont know
Theyβre rarities arenβt random
Say for example
God frog devil frog and celestial frog is not random
Theyβre going to be legendary
Etc
how do you obtain them
you give in a list of rarities and items
1/rarity
Kinda complicated
hmmm
idk if thats the right formula
I mean that does something but it creates decimals and would be hard to random through
random is decimal too
wdym
the method you use would theoretically still work as well
its my first time doing a rarity thingy π₯
i js noticed there isn't just a "#code" channel, there's #code-help and #code-discussion
π§
is it expected for it to be one
and #advanced-code
advanced-code
programmers get three channels (one extra for the skill role)
oh i didn't know that was a thing, it's locked for people that don't have the skill role
tysm
pshhh, imagine needing the skill role
hai
Why are you talking to the bot sonion
trying to work on programming commision with roblox till i get a job, any advice on what i should focus?
How to get access
Remember always to do humanoid.Animator, not just humanoid:LoadAnimation().
how to unlock that one?
tyy!!
Naughty america
no
Lable encoding
guys i cant get my p2w thing to work in team test aka the roblox servers i even asked gemini to help i really cant do anything so this is my last resort can anybody help me?
haha depends
what's your p2w item supposed to be
i think i got it to work but does the purchase work in actual roblox cuz it doesnt work in team test yet it works in the solo test
Just so I got it right debounce is basically a cooldown right?
u add a check and only allow if the check passes
and u immediately set the check to false right after
so that it can only run once until the cooldown resets the check
Does anyone know any experienced Roblox scripters? My game has 1k CCU, so I need someone whoβs worked on larger games before because I canβt risk major bugs or crashes affecting the player experience.
How works this instance? i saw it an alternative of body velocoty/linearvelocity
@orchid arch Hey bro wookie pookie can i try citadel v3 π
@turbid plume yo
gamepass testing works only on studio and doesn't actually affect what happens outside of it, basically meaning that if you try to "purchase" it, it won't actually deduct anything
for team test it won't work because gamepass purchases are client-sided and require a rejoin
I'm an intermediate in lua (I know mostly everything up to raycasting). Looking for someone to suggest a challenging code for me to make.
Im out of ideas
would making a rocket launcher be challenging?
An exact level of challenge I'm looking for.
ty
yw
is it better to do per task like do you get paid more
yes
i'm also out of ideas and i don't know what to make in studio
last time i asked people told me to make something that an intermediate won't exactly know what to do
same
Mb try making a time played leaderboard?
im pretty sure that one is straight-forward
fair