#code-discussion

1 messages · Page 261 of 1

cinder mulch
#

I mean like what

#

Commit history?

left kite
#

Version control with branching

cinder mulch
#

That’s all I can think off

cinder mulch
left kite
#

Roblox's version control is just linear

cinder mulch
#

Mhm

wraith creek
cinder mulch
#

God but I hate rebasing and merging branches

#

🙏

cinder mulch
wraith creek
#

Damn I have a lot to learn

cinder mulch
#

Like you bee working at multiple versions of a project at the same time

left kite
#

Linear just means a single timeline

cinder mulch
wraith creek
cinder mulch
#

Have you watched Loki @left kite

left kite
#

I have :D

cinder mulch
#

Just like what’s in Loki

fickle python
#

i need cool status effect suggestions to test this system i made

cinder mulch
wraith creek
left kite
# wraith creek Could u give an example please

Lets say I want to test out an experimental change. I can make a new branch and do the change on just that branch. That way I can continue to modify and test on the main branch without having to worry about my experimental changes impacting it. Then when I decide the experimental changes are going to make sense and work, I can merge them back into the main branch.

cinder mulch
#

Yeah that’s about it

#

It’s also very good when you have a lot of people

#

One person can work on one thing without messing up somone else’s work

#

Then merge once each person is done

#

(I also hate merging)

fickle python
#

honestly i have no clue how people even organize themselves to work with several other scripters

wraith creek
cinder mulch
#

That’s how I would do it

wraith creek
#

Aii but since I’m working alone I’ll just make another place in Roblox

#

Thanks guys

cinder mulch
#

NP

left kite
cinder mulch
#

Mhm

#

It is annoying though when other people have different coding styles

#

This one guy on a project just won’t use fucking modules

fickle python
# cinder mulch That’s how I would do it

i mean yeah but when it comes to game dev i feel like past a certain point like defining a general structure everyone has their own way of coding things
like I'm working with only one other scripter and yet the way we do it is that if i say I'm gonna be making the combat that means i will make the entire combat system without him making any changes to it

wraith creek
#

Cuz I ain’t tryna be a weirdo

cinder mulch
#

For small stuff using just regular scripts is fine

#

Just when it gets bigger it’s better to use modules

wraith creek
#

Yeah but still

fickle python
cinder mulch
fickle python
#

hopefully i will never have to work with like several other scripters cuz it's actual hell

cinder mulch
#

Well your going to need too if you plan to get a job in programming

cinder mulch
#

Or it all gets taken by AI and I’m going to go to collage for nothing

fickle python
fickle python
#

scripting is like the very last option

cinder mulch
#

I mean this only happens if AI gets much better

fickle python
cinder mulch
#

I’ve tried using it and it still can’t code anything complex

#

Okay I gotta go to bed

#

Bye

fickle python
#

yeah for anything remotely complex you spend so much effort making sure the AI doesn't lose context and the structure is robust enough to not lead to future issues that it's more or less the same amount of effort as coding it yourself

left kite
#

And even then you incur significant technical debt because you don't know how the system works unless you read through the entirety of the program.

fickle python
#

exactly

cinder mulch
#

👆🏻

fickle python
#

AI doesn't really help you if you don't know how to code it yourself

wraith creek
#

IMO I think ai should be used in coding but only to help not take over

#

But that’s my opinion idk

cinder mulch
#

Yeah you have to be able to guide it with the right questions

#

Maybe later you won’t have too🤷‍♂️ who knows

left kite
#

There is a good Anthropic study on AI usage in programming.

cinder mulch
#

I hope I can still do what I love to do🙏🙏

wraith creek
#

I doubt it but hope

cinder mulch
wraith creek
cinder mulch
#

What league

wraith creek
#

MLS next now

cinder mulch
#

NICE

#

I’m in EDO

#

EDO

#

EDP

wraith creek
#

W

cinder mulch
#

I’m trying to get to ecnl

wraith creek
#

Hope u make it

cinder mulch
#

Thx

burnt temple
#

whats the best way to get real developing experience, like working with others, like real game making experience

wraith creek
#

and where ur at in ur knowledge of coding

#

But if u want professional

burnt temple
#

i dont think im like beginner beginner

#

but ik im not like professional level

#

but i feel like rn the best way for me to get better is experience

wraith creek
#

Alr h should prolly try and work at a studio

burnt temple
#

i want to, but i havent been able to find any to work for that arent some like extremely small thing

wraith creek
#

I see

#

Do u have a portfolio

burnt temple
#

i do not

#

i should make that first?

wraith creek
#

yes definitely

fickle python
#

which will most likely flop or never get released till you get good at it

wraith creek
#

Yep

burnt temple
#

i do try and work on games

#

but then its annoying and time consuming when it comes to needing things like anims, vfx, or builds

fickle python
# wraith creek Yep

if you want to make sure you are working with a good dev ask them to show you their failed projects

burnt temple
#

i do try to learn

#

but its hard to like

wraith creek
burnt temple
#

do all this and stay motivated

wraith creek
#

Then

fickle python
#

yeah it might take a few years

burnt temple
#

ontop of other things in my life too

#

i wanna have a decent game by like a year from now

fickle python
#

the way game dev goes is that your very first skill is the one that will take the longest to get good at

#

and then it gets progressively easier

#

so like if you learn modelling you will have a much easier time picking up animation and the other way around is also true

iron kraken
#

ur wise

#

@fickle python

fickle python
iron kraken
#

chopped

fickle python
left kite
#

All the skills have there hidden limiting factor. Programming's is problem solving

burnt temple
#

but like i want like a clear path

left kite
#

That's what takes the longest to build

iron kraken
#

there is no clear path

fickle python
fickle python
burnt temple
#

okay

#

ill try to devote

#

3 hrs a day

left kite
burnt temple
#

well

fickle python
#

plus unless you have alot of money or alot of connections you will end up having to learn almost everything anyways sad_hamster

burnt temple
#

i want to have a game out thats good enough to shine on my college apps

left kite
#

There are plenty of games out there that have HORRIBLE code and assets, but they're fun to play

fickle python
#

true

burnt temple
#

good stat wise

iron kraken
#

low chance

#

unless ur good at something related to game dev

burnt temple
#

nope

#

i have been scripting for like a good year now prob

#

but feel like i havent really moved up a ton

iron kraken
#

are u practicing every day

burnt temple
#

i wouldnt say every day

#

im not very discplined rn

#

but ill lock in on that

fickle python
#

just get started on something that is a bit above your current skill level and be too stubborn to give up

#

your 3 hours a day will quickly turn into 16 hour long workshifts

iron kraken
#

skill issue

fickle python
#

lemme stop procrastinating already and go to sleep

#

it's day 5 and I'm already dying but i think i can finish the whole game in less than a month

left kite
# burnt temple but feel like i havent really moved up a ton

Well how much do you know? Because there is a point where Roblox scripting kind of stops being just learning the Luau syntax and Roblox API. It transitions more into organization and how to build a system that can scale well. At that point it does feel like its hard to move up, while also feeling like there is a TON you don't know

iron kraken
#

i hope i can finish my game bruh

fickle python
#

what the fuck is oop

burnt temple
iron kraken
burnt temple
#

its def the organization and system stuff

#

and i feel like

#

theres so much different things to do

iron kraken
burnt temple
#

i do

iron kraken
#

use oop

left kite
fickle python
#

the game I'm making has nothing but modules shit is so meta

burnt temple
# iron kraken use oop

this is what im currently like learning, ik how it works just not when to apply it and how often

iron kraken
left kite
#

OOP is mainly useful when you want to tie functionality to the state its acting upon

iron kraken
#

just think when u think a class is good because that offers features than just a value in a table

#

so if u need those features then use it but if not dont

burnt temple
#

okay

#

how often do you guys use oop

left kite
#

You can get away with not using any custom OOP. Obviously Roblox uses OOP for all of its API, so you're still using it even if you're not making custom classes

#

In Luau the only difference to having functions to act on passed state, and OOP is that OOP uses metatables to link the functions directly to the state.

burnt temple
#

okay ill keep that in mind

fresh basalt
#

If ur a Scripter and wanting to work on something useful pull req my library… it needs some work

left kite
# burnt temple how often do you guys use oop

I used to use a ton, which I think is generally the case when you first learn OOP. But the more you use it, the more it does start to feel bloated and unnecessary. Currently I use OOP occasionally when I find it makes sense or helps me organizationally, but its not something I reach for that often.

#

Functional programming is much easier in a lot of cases and removes the overhead of metatables.

fresh basalt
fresh basalt
#

Coding w a oop mindset is gonna help you reuse a lot of your code for a lot of different systems

burnt temple
#

okay ill keep this in mind

#

thanks guys

left kite
#

The thing is, the Roblox API is already mainly OOP. It's very common from what I've seen for people to take some instance and then wrap it in their own class just for the sake of adding a couple states to it. People wildly overuse OOP

fresh basalt
#

Tbh it’s whatever makes it easier for YOU and your team to understand

left kite
chilly canyon
#

Poo

left kite
left kite
fresh basalt
left kite
#

Personally, this looks like what we were just talking about. Not a case for OOP lol

fresh basalt
#

it’s a work in progress but its lowk also a Habit

#

I want to also add Per-tween configuration so

left kite
#

ahh ok, I was just wondering lol

fresh basalt
#

I’m gonna use self

fresh basalt
left kite
#

I'll look through. Doesn't look like something I'd necessarily use, so idk if I'd contribute because I don't really understand goal here. But maybe the pathfinder stuff, haven't looked at that yet.

wide rapids
#

Im not sure how, but when i hit an object and ragdoll, it lag anyone have idea why

fresh basalt
iron kraken
#

eeeeeee

fresh basalt
#

Horror games def, custom physics, any game w procedural movement, npcs, etc…

#

Js for devs who wanna save time

#

I’m also wanting the tweens to detect anything including like camera (for camera shakes or tweens)

left kite
#

Most of the tween stuff is just simple wrappers for TweenService, which isn't ideal especially when its making decisions like fading both text and background for GuiObjects.

fresh basalt
#

I’m ofc gonna implement better functions and expand on the current ones to make it’s use flexible

left kite
#

I'm not saying it looks unfinished, I'm just saying I don't really understand why I'd give up the finer control of TweenService to use a module that I still have to enter most of the values for anyway.

fresh basalt
#

Something like a sin tween w a hover tween would take longer than js typing in the values u want the functions to do

#

Just tell the hover function from here to here and rotate this much (or infinitely) at this speed

left kite
#

I'm mainly referring to the wrapper functions, I think those should be dropped probably. Let people use the module for the more complicated stuff, while enforcing they use TweenService for the simpler things.

#

If you have functions like that you're going to have people using them unknowingly adding unneccessary overhead for things they can easily just do with TweenService.

#

Creating bad patterns.

mild cloak
#

You’ve been at ts for like 5 hours

left kite
#

For like 30 minutes :3

mild cloak
#

Not even you started yapping at the start of my shift

left kite
#

Ohh just in general

#

Not about this specifically

#

Started talking like 2 hours ago

mild cloak
#

Boi it’s been 5 hours

left kite
#

almost 2

mild cloak
#

No

#

Just about 5

left kite
left kite
#

Sent my first message 5 hours ago if thats what you're talking about..

#

But I wouldn't say I've been active in the chat for that long lol

mild cloak
#

Yes you have bro

left kite
#

🫡 YES SIR

fresh basalt
# left kite I'm mainly referring to the wrapper functions, I think those should be dropped p...

ik people can usually USE tween service but the important part is that its going to be SAFER, gives more control, and simpler to use, even for a fade out function, something like fading out a frame (with like alot of children) in tweenservice is going to be way more work than just doing the :FadeOut using the module. its why people use ProfileService over Datastoreservice (if they are serious about making games). because overall its safer and gives more control

fresh basalt
mild cloak
fresh basalt
#

no.

left kite
fresh basalt
#

HE is locked in

twilit steeple
#
simpleNet.listenServer("buyItem", function(plr, itemName)
    local itemData = shopItems[itemName]
    if not itemData then return end
    
    if itemData.product then
        MPS:PromptProductPurchase(plr, itemData.product)
        return
    end
    
    if dataService.getData(plr, "Coins") < itemData.price then return end
    dataService.incrementData(plr, "Coins", -itemData.price)
    dataService.addOrIncrementData(plr, "inventory."..itemName, 1)
    AS:LogCustomEvent(plr, "Buy Item", itemName)
end)

Is this the correct way of using analytics service? itemName is a string.

fresh basalt
#

its only been like a week project rn cs i got work n school i barely got time to work on it

left kite
# fresh basalt yes 🙏

Like I said, I don't really see the vision. But if you've got this big idea I'm not going to get in your way. Innovate and make that shit happen

fresh basalt
#

something like

#

use a table

#

AS:LogCustomEvent(plr, "Buy Item", {
item = itemName,
})

twilit steeple
twilit steeple
#

is there a thank command here?

fresh basalt
#

im making the tween module so you're able to control tweens better and so it saves u the work

iron kraken
#

tghanks boss

fresh basalt
#

im lowk working on it rn

#

ill brb

#

in like 2h

left kite
iron kraken
#

then they just walk in a straight line to target instead and stop when they hit something in front of it

left kite
iron kraken
#

still seems kinda scuffed idk if it will look good because there is a lot of pushing around so maybe i can reduce that and also at 200 boids it starts to lag

left kite
#

Ahhh okk

iron kraken
#

and based it on sebastian lague code

#

its not that crazy but theres just 4 properties of boids

#

target steering
alignment steering
cohesion steering
avoidance steering

#

also his is 3d mine is 2d so its more simple

fresh basalt
#

FREAK

#

@left kite u made me rethink how im gonna code it now ima js restart ..

somber imp
#

just made this script that makes the button explode when you click it 25 times, please be brutally honest because i am just starting and i want to make it as professional and as good as possible how bad is it

game.Players.PlayerAdded:Connect(function(player)
    local leaderstats = Instance.new("IntValue", player)
    leaderstats.Name = "leaderstats"
    local clicks = Instance.new("IntValue", leaderstats)
    clicks.Name = "Clicks"
    clicks.Value = 0
    
    local function click()
        game.Workspace.button.Size = Vector3.new(0.19, 0.922, 2)
        clicks.Value += 1
        wait(0.25)
        game.Workspace.button.Size = Vector3.new(0.456, 0.922, 2)
    end
    
    game.Workspace.button.ClickDetector.MouseClick:Connect(click)
    
    while clicks.Value <= 25 do
        wait()
        if clicks.Value >= 25 then
            local explosion =Instance.new("Explosion", game.Workspace)
            explosion.Position = Vector3.new(0.661, 3.033, -1.616)
            wait()
            game.Workspace.button:Destroy()
            game.Workspace.Part:Destroy()
            game.Workspace.part:Destroy()
        end
    end
end)
#

also the button goes up and down when you click it

fresh basalt
#

okay

#

brutally honest

somber imp
#

yes please

fresh basalt
#

You bind the ClickDetector inside PlayerAdded

somber imp
#

like i know its terrible

fresh basalt
#

This is a huge logic flaw

somber imp
#

so how does it work

fresh basalt
#

You destroy three parts with hard‑coded names also

somber imp
#

cus im hella confused

somber imp
fresh basalt
#

the issue is that your logic is in the wrong place and your structure is fighting you. move all button related logic out of PlayerAdded, because connecting a ClickDetector inside that event multiplies connections per player and breaks the click count. treat the button as a single global object with a single click handler, and treat leaderstats as perplayer data that shouldn’t control global destruction. replace your while loop with a .Changed or threshold check so you aren’t polling every frame. n PLEASE avoid hard‑coded Workspace references. js store the button, parts, and explosion position in variables or use relative positions so the script doesn’t break when the workspace/map changes. And finally, visual effects should be on the client for the button press animation so it feels smooth n doesn’t lag.

left kite
somber imp
left kite
somber imp
#

gotcha

deft coral
# somber imp gotcha

in coding there are two main things that happen, data and procedures. data is stuff, and procedures are what you do with the stuff

#

logic refers to the procedures part, saying "this is a logic flaw" is saying the steps you're taking in manipulating your data are flawed, you're solving your problem wrong

somber imp
#

like if i was adding 1 to 1 in math instead of subtracting 1 and adding 2 i can just add 1

somber imp
#

ok gotcha

#

im like really new to this so i dont know any of the better ways to do stuff

#

i literally just now found out what tables do

deft coral
#

thats fine

somber imp
#
local button = {game.Workspace.button, game.Workspace.Part, game.Workspace.part
}
#

first time using that

#

then made it

button:Destroy()
somber imp
# fresh basalt the issue is that your logic is in the wrong place and your structure is fightin...

yo is this better

local button = {game.Workspace.button, game.Workspace.Part, game.Workspace.part
}

game.Players.PlayerAdded:Connect(function(player)
    local leaderstats = Instance.new("IntValue", player)
    leaderstats.Name = "leaderstats"
    local clicks = Instance.new("IntValue", leaderstats)
    clicks.Name = "Clicks"
    clicks.Value = 0
end)

game.Workspace.button.ClickDetector.MouseClick:Connect(function(player)
    
    local clicks = player.leaderstats.clicks
    
    while clicks.Value <= 25 do
        wait()
        if clicks.Value >= 25 then
            local explosion =Instance.new("Explosion", game.Workspace)
            explosion.Position = Vector3.new(0.661, 3.033, -1.616)
            wait()
            button:Destroy()
        end
    end
end)
left kite
somber imp
# left kite I wouldn't really say its about doing it a better way, even though there is. A "...
game.Players.PlayerAdded:Connect(function(player)
    local leaderstats = Instance.new("IntValue", player)
    leaderstats.Name = "leaderstats"
    local clicks = Instance.new("IntValue", leaderstats)
    clicks.Name = "Clicks"
    clicks.Value = 0
    
    local function click()
        game.Workspace.button.Size = Vector3.new(0.19, 0.922, 2)
        clicks.Value += 1
        wait(0.25)
        game.Workspace.button.Size = Vector3.new(0.456, 0.922, 2)
    end
    
    game.Workspace.button.ClickDetector.MouseClick:Connect(click)
    
    while clicks.Value <= 25 do
        wait()
        if clicks.Value >= 25 then
            local explosion =Instance.new("Explosion", game.Workspace)
            explosion.Position = Vector3.new(0.661, 3.033, -1.616)
            wait()
            game.Workspace.button:Destroy()
            game.Workspace.Part:Destroy()
            game.Workspace.part:Destroy()
        end
    end
end)

this is the original code which i see now i shouldve made all the destroyed things into one variable, and taking all of the click stuff out of the playeradded function but it does do the same thing right

left kite
deft coral
#

where'd he do that

deft coral
#

oh the top one

somber imp
#

what happens if i do that

left kite
#

Error

deft coral
#

itll throw an error

somber imp
#

how do i fix it + make it still clean

left kite
#

It'll say attempt to call nil value or something

deft coral
#

tables are like containers, in fact you can kinda extrapolate tables to being everything.

#

its a list of stuff, you didnt put Destroy in it

#

so when you try to use it, itll error saying it couldnt find Destroy

somber imp
#

but i cant make it just destroy all that?

deft coral
#

you gotta do whats called a loop

somber imp
#

yea ive been using while loops a lot

#

but thats all i know

deft coral
#

this one is a for loop

#
for _, obj in (table) do
obj:Destroy()
end
#

itll go thru the table one thing at a table and run the code for each thing, assigning the variable obj in place for that thing at that place

somber imp
#

ive never used for and whats the blank

deft coral
#

the blank is the key the object is at in the table

#

you can make it a variable but since urs is an array its pointless, itll just be a number and not necessary to what ur doing

left kite
deft coral
#

its funny because the original way was doing table.foreach lol

somber imp
#
local button = {game.Workspace.button, game.Workspace.Part, game.Workspace.part
}
game.Players.PlayerAdded:Connect(function(player)
    local leaderstats = Instance.new("IntValue", player)
    leaderstats.Name = "leaderstats"
    local clicks = Instance.new("IntValue", leaderstats)
    clicks.Name = "Clicks"
    clicks.Value = 0
end)

game.Workspace.button.ClickDetector.MouseClick:Connect(function(player)
    
    local clicks = player.leaderstats.clicks
    
    while clicks.Value <= 25 do
        wait()
        if clicks.Value >= 25 then
            local explosion =Instance.new("Explosion", game.Workspace)
            explosion.Position = Vector3.new(0.661, 3.033, -1.616)
            wait()
            for _, obj in (table) do
                obj:Destroy()
            end
        end
    end
end)
#

ok so this is what i got right now

deft coral
#

u cant just copy and paste homie

#

it dont know what (table) is that was a placeholder

#

u gotta put ur table there

somber imp
#

oh i literally thought it was exactly that

#

ok so i put button there

deft coral
#

yes

#

otherwise it dont know what table u want it to go thru

somber imp
#
for _, obj in button do
    obj:Destroy()
end
deft coral
#

ya

left kite
somber imp
#

is that a good thing to do

#

like just go and look at the forum for lua and just learn stuff

left kite
#

Yeah

deft coral
#

why wouldnt it be

#

"is it good to read abovut the thing im trying to learn"

somber imp
#

i didnt know if it was like too complicated or something

deft coral
#

lol

somber imp
#

if they like overcomplicated things

left kite
#

The Roblox documention is pretty good

#

Its not all that complex, they do a good job at giving examples and explaining things that are commonly used

deft coral
#

yeah they dumb it down p well

#

even if sometimes theyre literally incorrect but

#

generally they fix it

left kite
fresh basalt
wicked palm
#

yo

fresh basalt
left kite
wicked palm
#

can anyone help me make like money or something like how steal a brainrot does?

left kite
#

I have no idea what that is lol

deft coral
#

u right cuz i cant even find it on their github

#

ive seen this before though

#

like ten years ago

#

does it have to do with the camera

wicked palm
#

could any1 help me

deft coral
#

ah

#

probably when their voxel stuff was new and they were gonna do some funny stuff

wicked palm
#

could anyone help me make a pick up system rq?

deft coral
#

this is cold help not code do it for you

fresh basalt
#
local EM = require(ReplicatedStorage.EasyMath.EasyMath)
local T = EM.Tween

local cam = workspace.CurrentCamera
local part = workspace.TweenPart

local s = part.Position + Vector3.new(0, 1, 0)
local e = part.Position + Vector3.new(0, 3, 0)

T:Hover(part, s, e, -1, 1)
T:Rotate(part, -1, 0.5)

task.delay(1, function()
    T:CameraShake(cam, {
        magnitude = 2,
        roughness = 30,
        rotation = 4,
        fadeIn = 0.2,
        fadeOut = 0.5,
        duration = 2
    })
end)

task.delay(2, function()
    T:Move(part, Vector3.new(5, 0, 0), 1)
    T:Scale(part, 1.5, 1)
end)

task.delay(3.5, function()
    T:FadeOutTree(part, 2)
end)

task.delay(6, function()
    T:FadeIn(part, 2)
end)

task.delay(7, function()
    T:Rotate(cam, -1, 0.2)
end)

task.delay(8, function()
    T:Move(cam, Vector3.new(0, 0, -5), 1)
end)

local ui = Players.LocalPlayer:WaitForChild("PlayerGui"):FindFirstChild("CommandUI")
if ui then
    local f = ui:FindFirstChild("CommandFrame")
    if f then
        T:Rotate(f, -1, 1)
        T:FadeInTree(f, 1)
    end
end
wicked palm
#

bro what

deft coral
#

thats brutal LMAO

somber imp
#

hey so uh in the for loop the explosion just keeps exploding forever how do i fix that

deft coral
#

not sure ngl

fresh basalt
somber imp
#
if clicks.Value >= 25 then
    local explosion =Instance.new("Explosion", game.Workspace)
    explosion.Position = Vector3.new(0.661, 3.033, -1.616)
    wait()
    for _, obj in button do
        obj:Destroy()
    end
    print("boom")
end
deft coral
#

horrors beyond comprehension rn

somber imp
#

thats the code btw

fresh basalt
#

??? it saves 300 lines of code n looks bad ..

#

yo is hidden devs serious anymore

somber imp
fresh basalt
#

they dont its supposed to be a module inside of a library

left kite
fresh basalt
#

yes

#

but wait

#

that lowk js makes it way more complicated n harder to read

somber imp
#

chat how do i make this loop only once instead of over and over again

for _, obj in button do
    obj:Destroy()
end
somber imp
#

i havnt gotten that far yet

fresh basalt
#

table.clear

somber imp
#

after it hits 25 clicks it nonstop explodes

#

instead of once

fresh basalt
#

it doesnt

#

the threads come from the module itself

#

thats js the test script

#

Only procedural effects create Heartbeat loops

#

and they disconnect respectively

somber imp
#

oh yea whats the difference between wait() and task.wait()

fresh basalt
#

yes i guess you are right

#

you should pull request the git

#

1.0.6 out as of

#

0.1 seconds ago

halcyon talon
#

How do i get better at scripting(p.s ive been tryna script a door first person system and its pain) 🙏

deft coral
#

not the module

somber imp
#
local button = {game.Workspace.button, game.Workspace.Part, game.Workspace.part
}

script.Parent.ClickDetector.MouseClick:Connect(function(player)

local clicks = player.leaderstats.Clicks
    local explosions = 0
    clicks.Value += 1
    print("Clicked!")
    
    while clicks.Value <= 25 do
        task.wait()
        if clicks.Value == 25 then
            local explosion =Instance.new("Explosion", game.Workspace)
            explosion.Position = Vector3.new(0.661, 3.033, -1.616)
            print("boom")
                for _, obj in button do
                    obj:Destroy()
                break
            end
        end
    end
end)

so how do i make the explosion stop exploding over and over again and just make it explode one time

somber imp
fresh basalt
twilit sapphire
#

you guys are smart pls help

tight hatch
deft coral
tight hatch
#

1 sec I am in ms paint

iron kraken
#

area of parallelogram is base times height

twilit sapphire
iron kraken
#

cuz u can just cut off the right part and put it on the left part and its a rectangle

twilit sapphire
#

the formula you said

iron kraken
#

then use soh cah toa on the right triangle to find the angle

twilit sapphire
#

b x h divided by 2

deft coral
iron kraken
twilit sapphire
iron kraken
#

ik

twilit sapphire
#

we need to find the thetir

iron kraken
#

it says find tehta

twilit sapphire
#

or wtv its called

#

the weird looking 0

iron kraken
#

but u ahve the area

deft coral
#

theta isnt a right angle so

tight hatch
#

nvm dont need ms paint

#

got lazy

#

anyway

twilit sapphire
#

smart cookie

tight hatch
#

perpendicular to the 6.8 side

deft coral
twilit sapphire
tight hatch
twilit sapphire
#

it says to 1 d.p

left kite
# twilit sapphire just say the answer

I'd imagine these exercises are meant to help ingrain these concepts into your head, no? Why else would you be doing them. Asking someone else for the answer defeats the purpose lol

deft coral
tight hatch
#

wait yeah mb

deft coral
#

granted i just did that and it didnt work

tight hatch
#

its arcsin

tight hatch
#

mb I am dumb

twilit sapphire
#

and its compulsory

tight hatch
#

anyways the reason I am in this channel

twilit sapphire
#

when i mean no one does it i mean like they dont like work it out just ai it

tight hatch
#

guys what is the best networking library

deft coral
tight hatch
#

there are so many like ByteNet, Zap, Blink etc. it's hard to choose

deft coral
#

yk maybe the nukes are a good idea

tight hatch
#

I know there is no one size fits all but

twilit sapphire
left kite
tight hatch
#

certain have to be better under specific constraints

somber imp
#

IT FINALLY WORKS

twilit sapphire
#

you guys really sounding like my parents huh

somber imp
#
local button = {game.Workspace.button, game.Workspace.Part, game.Workspace.part
}

script.Parent.ClickDetector.MouseClick:Connect(function(player)

local clicks = player.leaderstats.Clicks
    local explosions = 0
    clicks.Value += 1
    print("Clicked!")
    
    while clicks.Value <= 25 do
        task.wait()
        
        if clicks.Value == 25 then
            
            local explosion =Instance.new("Explosion", game.Workspace)
            explosion.Position = Vector3.new(0.661, 3.033, -1.616)
            print("boom")
            for _, obj in button do
                obj:Destroy()
            end    
            break
        end
    end
end)
deft coral
left kite
twilit sapphire
iron kraken
#

rah

twilit sapphire
#

im stuck at a stalemate here cant do nun

deft coral
#

hey dont run me

tight hatch
#

not my font, 0/10

deft coral
#

not my font, 0/10

somber imp
#

whys it look like that

twilit sapphire
#

is cos-1 arccos

#

ok

fleet silo
autumn hull
#

Try Jet Brains Mono

fleet silo
#

You know the adjacent sides, you know the area, you can use the formula Area = |a| |b| sin theta

chilly canyon
#

Yessir

radiant venture
tight hatch
#

I don't think it is possible in default chat window

#

except for emojis, you will have to create your own chat window

radiant venture
#

so i know it's possible

#

and i've seen dev forums on it i just don't understand it

left kite
#
plush zenith
#

im making custom characters/replication for my game and implemented resizable buffers 🥴

chilly canyon
radiant venture
chilly canyon
#

Np

plush zenith
# chilly canyon Why

im gonna be dispatching the server state to multiple clients via a buffer and when players leave, i also want the buffer to shrink to avoid wasting extra bytes

#

with 1 or 2 players it doesn't matter that much, but with 8+ it does

somber imp
#

just went from this

local function jump1()
    game.Workspace.obby.jumps.jump1.Anchored = false
    game.Workspace.obby.jumps.jump1.Transparency = 0.5
end

game.Workspace.obby.jumps.jump1.Touched:Connect(jump1)

local function jump2()
    game.Workspace.obby.jumps.jump2.Anchored = false
    game.Workspace.obby.jumps.jump2.Transparency = 0.5
end

game.Workspace.obby.jumps.jump2.Touched:Connect(jump2)

local function jump3()
    game.Workspace.obby.jumps.jump3.Anchored = false
    game.Workspace.obby.jumps.jump3.Transparency = 0.5
end

game.Workspace.obby.jumps.jump3.Touched:Connect(jump3)

local function jump4()
    game.Workspace.obby.jumps.jump4.Anchored = false
    game.Workspace.obby.jumps.jump4.Transparency = 0.5
end

game.Workspace.obby.jumps.jump4.Touched:Connect(jump4)

to this

local jumps = {game.Workspace.obby.jumps.jump1,game.Workspace.obby.jumps.jump2,game.Workspace.obby.jumps.jump3,game.Workspace.obby.jumps.jump4}

for _, part in pairs(jumps) do
    part.Touched:Connect(function(hit)
        part.Anchored = false
        part.Transparency = 0.5
    end)
end

whos proud of me

plush zenith
somber imp
#

dawg

#

thanks dawg

#

ts the first time ive used it

plush zenith
#

are you a new scripter

somber imp
#

yes very new

chilly canyon
#

Same

plush zenith
#

nice! keep going, you will get better

chilly canyon
#

Ty

somber imp
#

yea i hope so that first script was horrendous

thick loom
#

Type Error: (273,16) Expected this to be
'RBXScriptSignal' from 'Roblox'
but got
'RBXScriptSignal' from 'Roblox'
WHYYYYY

chilly canyon
#

yessir

somber imp
#

yea i defidently know what that means

thick loom
#

trove:Connect(CollectionService:GetInstanceAddedSignal(Constants.OneWayPlatform.Tag), function(platform)
self:_onOneWayPlatformAdded(platform)
end)

icy dew
thick loom
#

my trove accepts rbx signals normally..

somber imp
#

so it gets unanchored as your jumping to the next

#

and as you touch each one they get unanchored

plush zenith
somber imp
#

the jumps btw

plush zenith
icy dew
plush zenith
#

i have not used trove in a long time...

somber imp
thick loom
#

local types = require(script.types)
local Trove = {}
Trove.__index = Trove

-- Type exports
export type TroveT = types.Trove

--[[ -- TYPE DEFINITIONS
--_objects: {any},
--_cleaned: boolean,
---- Function type definitions
--Add: (self: Trove, object: any) -> (),
--Connect:(signal: {Connect: (any, (...any) -> ()) -> any}, handler: (...any) -> ()): any,
....
[...]

function Trove:Connect(signal: {Connect: (any, (...any) -> ()) -> any}, handler: (...any) -> ()): any
if self._cleaned then
return nil
end

local connection = signal:Connect(function(...)
    if not self._cleaned then
        handler(...)
    end
end)

self:Add(connection)
return connection

end

[..]

Works like a charm.

Everytime i use it in a platform script for which the source code was refactored FROM ROBLOX. it compiles with type errors. it runs normally but i know that for some reasons types dont match exactly..

icy dew
plush zenith
# thick loom local types = require(script.types) local Trove = {} Trove.__index = Trove -- T...

ima format ur code better

local types = require(script.types)
local Trove = {}
Trove.__index = Trove

-- Type exports
export type TroveT = types.Trove

--TYPE DEFINITIONS
--_objects: {any},
--_cleaned: boolean,
---- Function type definitions
--Add: (self: Trove, object: any) -> (),
--Connect:(signal: {Connect: (any, (...any) -> ()) -> any}, handler: (...any) -> ()): any,

function Trove:Connect(signal: {Connect: (any, (...any) -> ()) -> any}, handler: (...any) -> ()): any
    if self._cleaned then
        return nil
    end

    local connection = signal:Connect(function(...)
        if not self._cleaned then
            handler(...)
        end
    end)

    self:Add(connection)
    return connection
end
#

now that it looks better ima take a look at it

somber imp
#
for _, part in pairs(workspace.obby.jumps:GetChildren()) do
        part.Anchored = false
        part.Transparency = 0.5
end
plush zenith
#

(if you wanna format it like that, do this)

thick loom
#

for some rason HD dont trust me even to send code

#

'''lua
whatt
'''

plush zenith
#

no, not quotations.

chilly canyon
somber imp
#

use `

plush zenith
#

the backtick key

chilly canyon
plush zenith
#

beside the 1 button

chilly canyon
#

.__tostring

plush zenith
#

you can do it!!!

chilly canyon
plush zenith
#

@thick loom remove the type casting from Trove:Connect

chilly canyon
#

Yessir

icy dew
thick loom
#
if only, i in agurate (:>)
thick loom
plush zenith
somber imp
#

why am i getting errors for this code saying

"Humanoid is not a valid member of Accessory "Workspace.Xezls2Alt.Back""
"Humanoid is not a valid member of Accessory "Workspace.Xezls2Alt.Neck""
etc with all my accessories and hair

lava = script.Parent

lava.Touched:Connect(function(hit)
    hit.Parent:FindFirstChild("Humanoid")
    hit.Parent.Humanoid.Health = 0
end)

lava.CanCollide = false
lava.Anchored = true
#

but it works fine making me die

plush zenith
plush zenith
somber imp
plush zenith
#

i think i spelt ancestor wrong...

wary cairn
plush zenith
#

how do you spell it again?

wary cairn
#

and use if hit.Parent == Humanoid then

thick loom
#

ive used in a movement system + UI framework.. My PlatformServiceModule is acting up

    -- Use Trove for cleanup management
    local trove = self._trove
    if not trove then return end

    -- MOVING PLATFORMS: Connect CollectionService signals
    trove:Connect(CollectionService:GetInstanceAddedSignal(Constants.MovingPlatform.Tag), function(platform)
        self:_onMovingPlatformAdded(platform)
    end)---Compiles with Type Error

    trove:Connect(CollectionService:GetInstanceRemovedSignal(Constants.MovingPlatform.Tag), function(platform)
        self:_onMovingPlatformRemoved(platform)
    end)---Compiles with Type Error

    -- Initialize existing moving platforms
    for _, platform in CollectionService:GetTagged(Constants.MovingPlatform.Tag) do
        self:_onMovingPlatformAdded(platform)
    end

    -- ONE-WAY PLATFORMS: Connect CollectionService signal
    trove:Connect(CollectionService:GetInstanceAddedSignal(Constants.OneWayPlatform.Tag), function(platform)
        self:_onOneWayPlatformAdded(platform)
    end) ---Compiles with Type Error

And the type error is
Type Error: (259,16) Expected this to be
'RBXScriptSignal' from 'Roblox'
but got
'RBXScriptSignal' from 'Roblox'

????? liike what will happen if i use a custom signal...

wary cairn
#

script.Parent = Gay

    ```
plush zenith
wary cairn
#

😔

plush zenith
#

can you put lines 259 and 16 here?

somber imp
wary cairn
#

pro

#

bro

#

yall lowk have some horrendous scripts

plush zenith
wary cairn
plush zenith
wary cairn
#

let me try

wary cairn
#

i also suck at it

plush zenith
#

ah, okay

#

my bad 🥴

somber imp
wary cairn
#

check this out

plush zenith
#

i wanna show off too hold on

wary cairn
#

oh nah

thick loom
# plush zenith can you put lines 259 and 16 here?

CollectionService:GetInstanceAddedSignal(Constants.MovingPlatform.Tag)
CollectionService:GetInstanceRemovedSignal(Constants.MovingPlatform.Tag)::RBXScriptSignal
CollectionService:GetInstanceAddedSignal(Constants.OneWayPlatform.Tag)

these lines :/

Type annotations dont eliminate the error either..

wary cairn
#

paradox

#

here

somber imp
#

waddup

wary cairn
#

local lava = script.Parent

lava.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Humanoid.Health = 0
end

lava.CanCollide = false
lava.Anchored = true

end)

#

0 errors

somber imp
#

what was the problem?

wary cairn
somber imp
#

yes very well

wary cairn
#

oh nice

somber imp
wary cairn
#

u didnt use local lava = script.Parent

somber imp
#

holy how did i do that

wary cairn
#

you just wrote lava = script.Parent

#

😭

somber imp
#

yo i gotta be top 10 slowest scripter oat

wary cairn
#

and also don't use :FirstFindChild

#

humanoid

#

use an if statement

plush zenith
#

audio spectrum analyzer in roblox studio 🥴

somber imp
#
lava = script.Parent

lava.Touched:Connect(function(hit)
    hit.Parent:FindFirstChild("Humanoid")
    hit.Parent.Humanoid.Health = 0
end)

lava.CanCollide = false
lava.Anchored = true

this is the original code

wary cairn
#

this lowk fire

somber imp
wary cairn
#

fr

#

😭

plush zenith
#

EditableImages

wary cairn
#

how does on do tjhat

#

WAIT

#

editableimages?

plush zenith
#

yeah

wary cairn
#

what deos that do

plush zenith
#

you can write raw binary data to it

wary cairn
#

can u like use it to animate ui?

wary cairn
plush zenith
#

and depending on what you write, colors and shapes will show up in specific regions

wary cairn
#

not binary vro 💔

thick loom
wary cairn
#

i hate it

plush zenith
#

lolz

wary cairn
#

guys

plush zenith
#

its in decimal so its not too bad

wary cairn
#

check out this cool ui

wary cairn
plush zenith
#

you can even stream a youtube video to an editableimage with http

wary cairn
#

😭

plush zenith
wary cairn
#

look some cool tweens

plush zenith
#

you called lava lava, so call character character

somber imp
plush zenith
wary cairn
somber imp
# wary cairn

ive seen those before im literally so baffled i dont understand it

wary cairn
somber imp
wary cairn
plush zenith
#
lava = script.Parent

lava.Touched:Connect(function(hit)
    local character = hit:FindFirstAnsectorOfClass("Model")
    character.Humanoid.Health = 0
end)

lava.CanCollide = false
lava.Anchored = true

@somber imp

somber imp
#

i only know thedevking fr

plush zenith
#

blame him 🥴

plush zenith
#

its okay guys

somber imp
#

so how does local actually effect it tho

plush zenith
#

i remember back in 2021 i was trying to migrate data for a bunch of players

somber imp
#

like what does it REALLY do

plush zenith
#

but i was a terrible scripter and ended up wiping everyone's data HAHAHAH

wary cairn
#

dang 😭

wary cairn
#

it's used to create variables

#

variables are basically used to name things

#

instead of saying script.Parent the whole time u can just say lava

plush zenith
wary cairn
#

or whatever u named it

somber imp
#

like u have to put local before functions too like

local function test()
somber imp
#

thats what ive been hearing

wary cairn
wary cairn
#

idk about otehrs

plush zenith
#

you won't get runtime errors if you dont put local, but all ur variables will be accessible anywhere in the script, which might cause you to accidentally change them when you dont want to

#

they will be in the global scope rather than the local scope

wary cairn
#

lowk

#

hate scripting

plush zenith
#

you will get better at it

#

want some motivation?

#

in 2023 i landed a 53k robux commission

#

since then i haven't done commissions much. i should get back into them though

wary cairn
#

dangg

wary cairn
plush zenith
#

ooh nice

#

where are you gonna post it at

wary cairn
#

i posted it on x

plush zenith
wary cairn
#

but I don't get much engagement w my posts

plush zenith
#

keep on posting

#

the grind is worth it

wary cairn
#

bro look at this

#

what even is that 😭

plush zenith
wary cairn
#

what that

thick loom
#

sends a request and doesnt wait for a response

plush zenith
wary cairn
#

oh

somber imp
#

why wont it work this time chat

local switch = script.Parent
local clock = game.Lighting.TimeOfDay

switch.ClickDetector.MouseClick:Connect(function()
    
        if clock == "00:00:00" then
            clock = "14:00:00" else
            clock = "00:00:00"
        end
    
    print("changed")
    
end)
wary cairn
#

is it useful tho

plush zenith
#

when you play overwatch, that's UDP, when you watch a youtube video, that's TCP

somber imp
#

the buttons supposed to change it from day to night btw

#

and if its night back to day

plush zenith
#

TCP = slow, UDP = fast

wary cairn
#

send me the

#

uh

#

items

#

on explorer

somber imp
#

like screenshot it

plush zenith
somber imp
plush zenith
#

you have to set game.Lighting.TimeOfDay directly

somber imp
#

oh so u cant make a variable for that

plush zenith
#

changing the variable will not change the property

somber imp
#

so why cant u do it with that specifically

plush zenith
#

you have to do game.Lighting.TimeOfDay =

plush zenith
#

changing the clone doesn't change the original

somber imp
#

.enabled

#

from true to false

plush zenith
#

yup, that's right. because ur storing the value inside a variable, which is nothing but a clone created from reading the property

thick loom
wary cairn
#

local switch = script.Parent
local clickDetector = script.Parent:WaitForChild("ClickDetector")

if clickDetector then
clickDetector.MouseClick:Connect(function()
if game.Lighting.ClockTime == 0 then
game.Lighting.ClockTime = 14
else
game.Lighting.ClockTime = 0
end
end)
end

#

here bro

plush zenith
#

you need to change the property directly

#

Voxel gets it too

thick loom
#

you can use to reference, but it changes the var

somber imp
#

this is what i ended up getting

local switch = script.Parent

switch.ClickDetector.MouseClick:Connect(function()
    
    if game.Lighting.TimeOfDay == "00:00:00" then
        game.Lighting.TimeOfDay = "14:00:00" else
        game.Lighting.TimeOfDay = "00:00:00"
        end
    
    print("changed")
    
end)
wary cairn
somber imp
#

lets goo

plush zenith
#

this will change the lighting property

somber imp
plush zenith
#

but if you ever want to keep a reference to the property's value, you can use a variable for that

wary cairn
#

yep

#

also

#

add a debounce 💔

plush zenith
#

you can read the value in the reference. you can also change the value in the reference and then set the property's value to the value of the reference.

#

this is how variables in lua work

somber imp
plush zenith
thick loom
#

--!strict
--!optimize 2
local switch = script.Parent ::ImageButton -- Whatever you use
local clock = game.Lighting.TimeOfDay

switch.ClickDetector.MouseClick:Connect(function()
local clock == game.Workspace.lightswitch.body.pole.PointLight -- He can do that
if clock == "Brightness Thing" then
game.Lighting.TimeOfDay = "Brightness Thing 2" else
game.Lighting.TimeOfDay = "Brightness Thing"
end
print("changed")
end)

wary cairn
plush zenith
#

not that its a bad thing, im just curious

somber imp
#

rather than just switch.ClickDetector.Mouseclick:Connect(function()

thick loom
somber imp
plush zenith
wary cairn
thick loom
plush zenith
#

like --!optimize 2

somber imp
# wary cairn yep

does that apply for everything like if i load in before my clickdetector loads in for my door open/close button it just wont work at all

thick loom
somber imp
#

didnt even know that could happen

wary cairn
#

lol same

somber imp
#

i thought it just kept loading either way

plush zenith
#

blockchain dev?

wary cairn
#

until it started happening to testers

somber imp
wary cairn
#

claude

#

saving my ass

thick loom
wary cairn
#

every time

somber imp
thick loom
#

u got more time than me man stay focused stay hustlin

somber imp
#

are you still a paratrooper?

plush zenith
#

you gliding in the air?

thick loom
#

Yessir, 10 more days to graduate my mandatory enlisting

#

joined a year ago

plush zenith
#

man yall are making me feel bad ngl 😭 im a dishwasher

thick loom
plush zenith
#

i've been looking to quit that part time job for a while in favor of something more programming orientated

#

my dad and aunt is trying to hook me up with a a cryber crime opporunity at the government for the summer so hopefully that goes well

thick loom
plush zenith
#

meanwhile im trying to release this roblox game and promote the hell out of it

plush zenith
#

the money is good and all but i just wanna be able to have the freedom to do what i want like i used to when i was a kid 🥴

thick loom
#

valid af guys, we all seen what Escape Tsunamis and Brainrots for at Q4

somber imp
# plush zenith correct

so based off this is there any way to make this better

local switch = script.Parent

switch.ClickDetector.MouseClick:Connect(function()
    if game.Workspace.lightswitch.light.pole.PointLight.Enabled == true then
        game.Workspace.lightswitch.light.pole.PointLight.Enabled = false else
        game.Workspace.lightswitch.light.pole.PointLight.Enabled = true
    end
end)
plush zenith
#

Steal a Brainrot because the most popular game IN GAMING HISTORY

thick loom
thick loom
#

thats an average GDP of a country or smt

#

small country but still..

plush zenith
jovial violet
plush zenith
#

literally just .Enabled = variable

jovial violet
#

learn to code

wary cairn
#

im just lazy

jovial violet
#

fair

plush zenith
#

pffft

somber imp
#

yea i wouldnt have even thought to do that

#

thanks tho it looks so much better and works

#

oh wait now it doesnt

wary cairn
somber imp
#

i prolly did something hold on

plush zenith
#

me love buffers

wary cairn
somber imp
#

again

wary cairn
#

🥺

plush zenith
#

lol

#

take a screenshot of the error that appears in the output, and send it here

plush zenith
#

btw i can't join vc cause i got vc muted a long time ago for some bullshit and they never unmuted me 🥴

#

that's why im only talking in here

balmy sorrel
#

I'm surprised I never got VC muted

#

permenantly

#

I was doin a lot of stupid shit a few years ago

neat siren
balmy sorrel
#

I would spam leave and join

neat siren
real karma
#

good

somber imp
#

any way i can make this cleaner?

local button = {game.Workspace.explodingbutton, game.Workspace.wedge, game.Workspace.body
}

game.Workspace.button.ClickDetector.MouseClick:Connect(function(player)

    local clicks = player.leaderstats.Clicks
    
    clicks.Value += 1
    
    print("Clicked!")

    while clicks.Value <= 25 do
        task.wait()

        if clicks.Value == 25 then

            local explosion =Instance.new("Explosion", game.Workspace)
            explosion.Position = Vector3.new(8.981, 3.033, -26.255)
            print("boom")
            
            for _, obj in button do
                obj:Destroy()
            end
            
            break
        end
    end
end)
real karma
somber imp
real karma
#

explosions

somber imp
#

oh yea forgot to delete that

real karma
#

don't use loops inside of an event

somber imp
#

i was trying to make it stop exploding over and over again and just do it once with some weird way that i quickly realized was dumb and the break was actually just in the wrong spot

real karma
#

I don't suggest it

somber imp
real karma
# somber imp whats wrong with it

you can do it but if it's a really big script, you can get off path and have more while loops inside of events and when you expect one to work, it doesn't

somber imp
#

because it has to keep checking if the player is at 25 clicks or not

#

and also has to destroy the entire table in the for loop

real karma
#

put the loop outside so you can manage other conditions in it and not only for one event

#

put the loop outside

#

and you don't need a loop

#

just the conditional statement inside of the event is enough

somber imp
#

like 4 variables on the outside and just destroy all 4 on the inside

#

instead of a table and a for loop?

real karma
real karma
somber imp
#

oh so the for loops fine

real karma
#

remove the while loop

#

you don't require it

#

there might be a logical error in your script

somber imp
#

so like i dont think i understand, what should i replace it with

#

what is it

real karma
#

not for entire server

real karma
somber imp
#

hows it work

dense abyss
real karma
#

@somber imp are u new to scripting

rich crane
#

Does anybody know how to make a match system?

somber imp
#

im just getting into this

real karma
somber imp
#

im trying to figure out how to make my code cleaner and work better

#

i was watching youtube stuff but right now im asking around as im trying to make things

real karma
somber imp
#

sure

real karma
# somber imp sure

when you finish writing a code,

  1. try to use less variables i.e not a lot of Boolean or data variables which aren't addresses of instances.
  2. try shortening your statements as much as possible
  3. have error handling statements i.e if something goes wrong, it will print in the output
  4. make your logic easy i.e not a lot of nested statements, unnecessary Boolean conditions.
  5. know the basics i.e having loops outside of events, not defining a function in middle of script but at the very top, good naming of variables of functions, keeping a systematic way of creating variables, functions and running loops i.e have first four lines for services such as useinputservice, replicatedstorage and the next 4 lines can be locations for instances.
  6. don't be afraid to add comments but don't overuse it.
  7. before you start mathematical operations, have a dry run done
  8. scan for all the three types of errors by dry running i.e logical, syntax and runtime error
somber imp
real karma
somber imp
real karma
#

understand your objective

#

an example of logical error would be

#

let's say you want to create a part instance for all the players so you have to use the script

#

but you use the localscript and place it in starterplayer

#

that's a logical error

somber imp
#

yea because thats just client right

real karma
#

another one would be dividing any number by 0

real karma
somber imp
earnest stag
true ginkgo
somber imp
#

or is it 0

real karma
#

or let's say you were supposed to return an array at the end of function but by mistake, you return an int number

earnest stag
real karma
earnest stag
real karma
earnest stag
#

u also don't make error handling everywhere, sometimes u can do it without error handling

real karma
#

yes

earnest stag
#

if ur script is reliable on error handling then ur script is an error

real karma
#

youre right

somber imp
#

is this like a polite argument

real karma
somber imp
#

debate

real karma
#

he's just saying things which I've stated above

earnest stag
#

no

real karma
#

not a debate either

earnest stag
#

its just an ensurement thing

real karma
#

yes

earnest stag
#

like a comment

somber imp
#

gotcha

#

im gonna go to sleep now goodbye

lost pebble
#

(search up the graph of 1/x and you'll see why)

heady crypt
#

u can divide 0 by things and its just 0

#

but u cant divide things by 0

cobalt salmon
#

uhm so

quaint sage
#

Uhm... Ignoring code help for now, I'm not sure how to make a customization menu like wcue, lt:r, and felandia has, does anyone know how to do this and can help me out?....

autumn hull
autumn hull
rancid dawn
#

how long until creator rewards starts coming in?

orchid arch
#

yall suck

real karma
real karma
#

but that doesn't mean you have 100 nested statements for a function which spawns an instance part in the workspace

autumn hull
real karma
#

yes

autumn hull
#

there is some edge cases like hotpath with optimisation but thats rare

#

where you can use more then that

real karma
#

youre right

orchid arch
#

tldr yall suck

autumn hull
#

wrong chanell bro

orchid arch
#

no

#

right channel

autumn hull
#

bro didnt get the joke

autumn hull
#

and task.delay

autumn hull
#

should i call doctor for you?

orchid arch
#

whats a doctor

autumn hull
orchid arch
#

im 86

autumn hull
orchid arch
#

86 decades*

real karma
autumn hull
real karma
#

depends on what u want to do

orchid arch
#

luau and performance in the same sentence

autumn hull
orchid arch
#

all my homies hate native

autumn hull
orchid arch
#

mfw krnls decompiler closed yo game if u used native

autumn hull
#

do you even understand what it is dude?

orchid arch
#

whos dude

autumn hull
#

ok NOODLE sir

autumn hull
#

Do you even know what is this? (may have some syntax issue)

  type function union(type1: type, type2: type): type
    return types.unionof(type1, type2);
  end;
orchid arch
#

thats a code block

autumn hull
#

you can go ragebait on your tik tok, that doesnt work on me

orchid arch
#

im not baiting

#

you asked what that is and i gave you an answer

autumn hull
#

imagine all code looks like that if you remove spaces, and center it

orchid arch
#

no thats only mine

autumn hull
#

@real karma

orchid arch
#

like2dev what does the code in that file do

autumn hull
#

do not work

orchid arch
#

it does work

#

it works very well

autumn hull
orchid arch
#

lua says it runs

autumn hull
#

we talk about Luau

orchid arch
#

it works on luau too

#

that sample is from a unit test that passed platform testing