#code-discussion
1 messages · Page 131 of 1
and remove print (hello)
And replace with
partIsTouched = false
then add back print hello
Done
When did you start scripting btw?
Anyone know how I can spin a model but keep the player on top of it while it's spinning?
Funny how 1 small thing cld ruin everything
only use touched
Tdy
not touch
Alr done
send ss again
I guess that's fine,no typos,
Alr lemme test it
By the way,if you started today,I would recommend watching a beginner scripting guide from a YouTube called BrawlDev,his explanation is so good.
lolll
i watched the same one
i learnt from him too
@simple axle
I did I watched up to functions and went to try smth
Really?me too,LOL.
you are on the advanced series?
Yes,I started it 2 days ago,and I am kinda slowing down mostly practice localscripts and the other things I learnt in the beginner guide.
same bro it was so ez thanks to him
where did you insert the script?
hmm
Put it in the part
Yoo guys started today.
Soo far soo good no struggling
Wanna add me?I don't play roblox itself ,but I am locked in on learning scripting right now,we can help making each other making a game in the future.
yeah
Oo me too
Ngl I wanted to make a game abt delivering milk Das why I'm learing scripting
did it work now
I already know how to model
15:21:03.055 Script Context.StarterScript:222: Script timeout: exhausted allowed execution time
I don't think you started today 💀
I did
I mean i have experiences from other languages. I just started with roblox today
Oh,that makes sense. No wonder you are good at it.
Yhea.. We can try to make something cool
Add
How do I export all of the code from my game?
in a txt or smth its really frustrating copy and pasting everything
wdym?
like iv got all of this code and more, that I wanna copy and paste
into chatgpt
i can give more context and stuff then, so whenever I need something made, itll do it for me much more affectively
rbxm or rbxmx or whatever, dont work because theyre in binary or smth
can someone help me understand a script
9guys im learning scripting through a roblox game should i stop or continue
If it’s good then continue. I never tried it but i would recommand you YouTube for learning
not a bad idea but I wouldnt except the game to be a functional product
I'm having issues with a module script if anyone has any ideas
Local Script
local trigger = workspace:WaitForChild("barrier")
local Players = game:GetService("Players")
local Teams = game:GetService("Teams")
local Player = Players.LocalPlayer
local Permissions = require(game.ReplicatedStorage:WaitForChild('Modules'):WaitForChild('Permissions'))
local debounce = false
trigger.Touched:Connect(function(plr)
local TPLayer = plr.Parent
if debounce then
debounce = true
local Humanoid = TPLayer:FindFirstChildOfClass("Humanoid")
if not Humanoid then return end
if not Permissions.Civilian_Team_Only(Player) then debounce = false return end
local root = TPLayer:FindFirstChild("HumanoidRootPart")
if not root then return end
TPLayer:PivotTo(root.CFrame * CFrame.new(0, 0, 15))
Humanoid.WalkSpeed = 0
Player.PlayerGui.WarningGUI.Enabled = true
for i = 5, 0, -1 do
Player.PlayerGui.WarningGUI.TextLabel.Text = "You passed the barrier and are on cooldown for "..i.." sec"
task.wait(1)
Humanoid.WalkSpeed = 16
end
Player.PlayerGui.WarningGUI.Enabled = false
debounce = false
end
end)```
**Module Script**
```lua
function Permissions.Civilian_Team_Only(Player)
if Player.Team == Teams.Civilian then return end
return true
end
issue is I can't get it to use the permission I set and I have no idea why it's not working it just stops at checking the users permission
sure
This code does the opposite of ensuring civilians only
it works to affect everyone except civs
return Player.Team == Teams.Civilian
This is all you need to write
yeah this fixed the module issue thanks, im gonna fix the debounce
Literally anything
Can I see someone’s portfolio
My GitHub is linked to my profile ;)
Ok thank you
Make an mini game or sword fighting arena
GitHub too confusing
ok
Not really
You script
Yes
the stuff on the right is his projects and his profile is on the left
I only know what a few words mean in scripting I tried for weeks but it was tough
i just made a github but i dont have any projects yet
can you edit properties
????
watch this: https://www.youtube.com/@BrawlDevRBLX
I make videos on Roblox game development! 🤯
My channel pretty much ranges from all kinds of Roblox game development-related stuff and I have a huge list of things I want to do with this channel and the community I want to build!
I'm primarily focused on teaching my viewers how to script on Roblox to create the games that they are passionate...
its what i watched
Hey guys, does anyone know whats going on with my katana, when i try to make the unsheathing and stuff its messing around and deleting the tool
when i said on the tool, it doesnt require a handle
?
Are u scripting the equipping?
If ur welding it make sure its welded properly
Since if it has no can collide and unanchored it can fall through the baseplate and get destroyed
I am scripting the equipping
oh shit yeah
your right
so when it falls through the map
it deletes itself agian
again am i right
?
Yeah once u equip it I assume ur parenting it to ur character or workspace and it loads in with no can collide and unanchored and falls through the map. Make sure u weld it properly so it doesn’t do that
having multiple playeradded in multiple code
or
having a centered 1 playeradded and does everything in it
does it even matter
Thank you alot bro, that was the problem, how did you know this?
I'd prefer less connections and simply one centered
Also simpler script
But connections really aren't that Bad in memory So dw about it, To me it's mostly abt preference and What you're trying to achieve especially organization
gotchu ty
Hey guys, how do you learn to code ?
Experience. There isn’t much ways a tool gets deleted without manually scripting it urself
I was wondering lol
thank you alot though
why doesnt my script work
what font yall use
Np
are you experienced
in adding sheaths n stuff
if u are, can you help me out
so far room system is going well. Turned on StreamingEnabled and even with 3k and increasing rooms and max 20 room creation tasks at the same time still fps smooth as butter
Why aren't you generating One room and whenever you enter One you create the next
For one I don't know how to do that lol
I've never made any system like this before in my life
I can’t rn sorry, if u have any questions just ask around there are plenty of people that can help u
I mean I could using Runservice and GetTouchingParts or something of that nature
I'm already using that anyway to detect when the player enters a new room
No don't, Just Do what you're doing now, Generate the rooms with a delay
guys what do alot of people use to write code, like that coding app
for lua, java etc
keyboard
Noooo that app, they write it in
robox setudio 
Yh no thas not what i mean
i use notepad 
Daamn
tyy to everyoine who helped i fixed the thoughts!!
Any coder want to make good money fast man, cmon everybody in #scripter-hirable is AFK MAN
Change the doors to tween service hinges so it always closes automatically
what u need to do
I mean I could easily implement your idea, is there a caveat?
me fr
Crazy it's almost like it's a || hobby||
scripter-hireable dont do it as a "hobby"
My dude roblox is not good enough to quit your job/school
i was able to make 3k€ for Build Commisions, thats better then most jobs lol
Espically if you're advertising on hidden devs
But true
Only the top 1k make a livable income
And good luck getting up there lol
Probably less than that
It's not that hard to land yourself a respectable contract if you're hard-set
Get sh*t done, get good, then sell yourself
Yeah, just don't do this
Ain't nothing wrong with clarifying imports. You're just adding overhead by unnecessary abstraction, abstraction which muddies the type annotation
If it bothers your workflow that bad, there are plug-ins that can auto-complete service imports
im not a fan of repeating service calls at the top of every script especially when its intended to be readable and OOP/type based, i agree it makes it a bit more inconvenient calling services.blabla every time
sorry meant to clarify its not about workflow its just an eyesore
just figured theres likeuhhhh better way to do it within the same boundaries
Solo scripting project, almost done with the whole ultimate system, you get random swords everytime, they all have the same attacks but all ultimates are unique
tuff
god damn do i hate the color yellow in my code i refuse to change the theme though
why do you hate it
just looks ugly LMFAOO its half the reason i was doing allat that i sent above
reminds me of the simpler times... the bad old days................................. the :waitforchild():waitforchild days 💔
@strange kiln meant this
aah
What’s wrong with wait for child
visual studio
that's just not how you handle instance loading in a modern framework, you're synchronously blocking a thread for a child of a child instead of using a promise or signal based loader 💔
I don’t know what those are bro
It’s not gay to use wait()
Cant you just use item.clickdetector
cadwa dwwdaok so a promise-based loader is where instead of your script literally freezing with :waitforchild(), you ask a central module for an instance and it immediately gives you a "promise" object back. yuor script can keep running and do other stuff, and you just tell the promise what function to run then the object actually loads. it's asynchronous, it doesn't block the thread!!!!!!
a signal based loader is when you have a loader module that finds everything andddd when its done loading it just fires a signal
it pretty much decouples ur script so they arent a tangled mess of dependencies
proper state management 2025
Nope. I don't find it to harm readability at all. It is a crucial component in every script: designated dependencies. The clearer you can be about what external resources your script relies on, the better
i dont believe everyone would agree with my standpoint 💔the "external resources" in question is purely a helper function
loads all the services at once, stores them in the metatable and then u can just call from there. good for modules and all that but i dont think id use that function in standard function based scripts
does anyone know how to change shitlock icon?? for everyone
yeah. have you cloned PlayerModule into StarterPlayerScripts yet?
you changed this?
yes
ah you likely have playermodule under a folder dont you
customshiftlock is likely overriding it
ok lemme see
disable it and go check if playermodule works
upload your image under an imagelabel then copy the ID and paste it there
k
so its an "rbxassetid://(code)"
i used a decal from roblox tho
Why do u use that purple script?
i dont believe /textures would work
all decals are like this ^ even textures
its a module script
module
kk
@amber acorn a module script is like running functions in your own script but from other scripts, its hard to explain but it improves pretty much everything
the most often use case is making your code not have 1000 lines and instead putting some of your key code into a child module
it's basically a function for scripts so you can reuse a function without repeating it in multiple scripts
Oh I get it
or running functions that multiple scripts call
yes!!!!!!! ^_^
I use it to check peoples permissions in groups so I dont have 9 billion lines of code with the same function
im very new to coding(started this week) are there any good tutorials/videos on how to learn the basics and fundamentals of scripting
devking for basics
ok cool ty
brawldev. started learning 6 months ago ish and im already working production level
hes my goat
ill check them both out thanks for help
Haitus' beginner series is the best. I would not go with any other series. You'll have to go elsewhere for everything else, as his tutorials do not go beyond the basics. I'm recommending this as a scripter who's been in the game for 12 years, lol
I coded a police car
Where do you learn to do that
Each car part sold separately
okay ill check him out
@vocal comet also huge tip for when ur learning, dont just say you're gonna apply it and not apply it. AS you are learning and you learn more stuff that you can make, go make games. go do silly stuff. whatever it is. applying the material you learn is the best form of learning ever
Scripted, taught with graphics, prerequisites covered, no misinformation, deep explanations and explorations of niche but objectively relevant details
okay ill try to apply everything i learn as best as i can
i learned from a bunch of youtube tutorials and knowing high tier devs and just referencing their style lmfao it clicked one day
Ultimately, you should try to learn why things work, not just how to apply them
It makes things easier to understand eventually
okay yh ty for help imma check out the vids and see how it goes
thats legit how i learned coding
:Stop() or just send it right to debris
stop or stopped
stop
stopped is the event that fires when it reaches the end of the sound @crude quarry
ah I see
- typically when you send it to debris
"Ended", actually
i must be geeked
copy the id put it in playermodule
it didnt work lol
the cursor has to be the exact right size or else it wont work
again the uhhh other script u have might be overriding
ur kidding
I made a terrible mistake
thats not true, if you put in a really big image it shows a really big image
ill give you an id holdon
just make it a white circle
ty
rbxassetid://569021388 try that
i had the same issue before, it just dont show for some reason
did you do playermodule, then camera module then cameralock module
huh
@hoary cedar OOPSS ur right i was thinking of when stop is called 💔
yup
@lethal pike im telling u the other script is probably interfering
Perfect xDDD
why textures
💔
rbxassetid://569021388 literally just copy THIS word for word
i am lol
and put it into the quotes
rbxassetid://textures/569021388 
brother.
rbxassetid://569021388
you're missing a /
bro
and the id part
CTRL C
and that
CTRL V
rbxassetid://569021388
rbxassetid://569021388
rbxassetid://569021388
rbxassetid://569021388
you're playin games
883120965//:ditessaxbr
883120965//:ditessaxbr
883120965//:ditessaxbr
did it work tho
essentially
yes
what part of the police car should I make next? Im thinking of having an engine start up and then the siren playing
✅
yeahhyeah do that
it worked
Sirens don't activate automatically; they're turned on by a switch
is this just supposed to be sum you activate while in the car
yeah it's the player making the noise
no its a joke like coconut horses
ts so peak
honestly if I had the patience to animate I would make coconut horses
tf is a coconut horse
@candid fox
reading my old messages in this server got me fckd up im cryin 😭 😭
how do i know the exact size and whats the size needed @candid fox
for r6 
thats like 5 minutes of research bro 😭
lmfao dont know what i was on back then
bro an ai can do that
I need to mess with camera work more, I wanna make a cutscene
im not a fan of using ai for any means in terms of actual coding, learning through ai is great though
ais the goat for learning icl
"AI turn this player list so every player is named daddy"
i only recently started using types about a couple months ago in my OOP scripts (the cyan stuff) and had no idea what they were until chatgpt taught me LMAO
swear
I'm having problems on the client. I have 12 cameras splitted and I need to access them on the client for a GUI related system. But the problem is the map is large so the player doesnt load the cameras and ends up only showing about 6-8 how do I fix this?
content provider
i had this same issue recently with a custom sky holdon maybe this can be of some use 1s
wait until the player is loaded
damn
cold advice
Yea i already scripted a loading screen so I used content provider so I didn't think I would need to use it again
every player has a different render
waitforchild or smthin
waitforchild
@summer phoenix assure your cameras are in a set folder location or whatever then just loop thru to preload
Im thinking of disabling StreamingEnabled before i do this
but its probably a bad idea
one thing I hate about coding is making a bunch of code and GUIs and then realzing you made too many and have to move them to a folder which means you have to modify the code
REALLLL
yeah it sucks. just make sure ur code isn't tightly coupled to your UI's structure. you should use a single controller script at the root of the GUI that caches references to all its descendants on startup that way you only ever have to change paths in one place
it's not that bad but when you have like 5 GUIs in 1 code it's just a minor inconvience
It is making me realize I need to be better at organizing
This is getting bad and I have to redo everything
im not even 1% done
Testing this,
-- Preload
for _, Cams in workspace:WaitForChild("HomeCams"):GetChildren() do
local success, err = pcall(function()
ContentProvider:PreloadAsync({Cams})
end)
if success then
table.insert(HomeCams, Cams)
else
warn("Failed to load asset:", Cams:GetFullName(), "Reason:", err)
end
end
Maybe instead of going through getchildren i should probably while loop until I get all of it
if you can guarantee nothing else will be in that folder then yeah
if you're handling multiple screenguis in one script you have to reformat your code
also having "GUI" and "ScreenGui" under a service* called StarterGui is not so nice
dont let it get confusing
It's all gonna have to be redone so it will be renamed
This is what the teams UI looks like currently'
lmao
so yeah complete revamp
works just had to add my own failsafe for loading
Guys how would I go about taking a unparented weapon from a Moon Animator Animation and scripting it to work in an actual game. For example if their is a cutscene and Player 1 throws a dagger into the air and catches it how would I go about scripting that?
I could probably figure it out on my own but what exactly does the promise system do? What is a promise object, and what does it do in lieu of the desired object being unloaded?
instead of your script actively waiting for something with WaitForChild, you give a function a task and a callback, and it notifies you when it's done
the promise object it returns holds the logic for whatever u need to run it with
I assume that’s stored as the function attribute of the promise object?
think of it less like a property and more like a signal or event. you don't read the function from the object. u connect ur function to the object's completion state with a method like :Then(). the promise itself just manages its internal state and calls all the functions you've connected when the time is right
dont think of it as a table key
What would that look like in code?
forget a real library for a sec, just imagine u have a function that does the waiting for you and gives you a promise
-- imagine this function returns a promise i dont wanna create one rn lmfao
local partPromise = someModule.waitForChildAsync(workspace, "PartToLoad")
print("started looking for part, but not waiting...")
partPromise:Then(function(part)
-- this part only runs when the function is found
part.BrickColor = BrickColor.Green()
print("part found and colored")
end):Catch(function(errorMessage)
-- this code only runs it if it fails
warn("couldn't find the part:", errorMessage)
end)```
@gusty heron
doing this gives a partial timeout
-- script stops here until "PartToLoad" exists
local part = workspace:WaitForChild("PartToLoad")
part.BrickColor = BrickColor.Green()
print("part found and colored")```
none of this is nearly necessary in standard scripting and all that
more production level stuff
but still good to know
How does it check for when the object is available
Wait is the first argument where it searches and the second the name of the object to be loaded?
And once it gets true it calls the :Then which is defined as the following function
it "listens" more than it does check, it sits there taking up no resources until roblox "announces a new child has arrived" in a way
it just waits for whatever you're looking for
yes!
yeah u got it
Ok but what sound does my game make so it knows it’s there
it creates a connection to the childadded signal if that makes sense
basically as soon as it loads
the promise takes it from where you set the directory
with the exact name/or however u call it
and then loads the function ASAP
waitforchild causes a minimal delay between that waitforchild and whatever other waits you have
Oh ok so then I’d want to define specific locations that multiple promises will listen to and have it send out to any promises with that location instead of making individual connections right?
yeah man you've got it !!!!!!!!! thats why you use a dedicated promise library
you dont want 50 different scripts creating 50 individual childadded connections on the same logic
all trickles down to DRY lmfao 💔
If a promise relies on multiple objects I guess I’d make it an array of names
yeah pretty much. you would use an array of promises using Promise.all, you give it a table of all the individual promises you're waiting on
and it returns a single new promsie that only resolves after every single one of the input promises has resolved
i completely forgot im ngl
Maybe it is good to call that defining a Promise Group
Oh so I can just download it?
Do they have it in plugin form
i dont think so no
lol ngl I was prepared to make it from scratch
😭
Never heard of it and barely used classes but it sounded possible
promises are really rarely used even if u look them up u dont find much on the forum
its more for like realllyyy really high budget games that need good ass optimization
but its a good practice generally considering it loads async
i dont see it used much and to be the most fair i dont use it on average
Ironic it seemed like you were flaunting it, carrying it around like fine wine
Which it seems to be by the description
Whats the difference between this and using something like defer?
lmfao i wasnt as serious when i was explaining my hait for :waitforchild():waitforchild() earlier i was just trying to express my HATE for seeing a million different declerations at the top of each and every script
it looks so cluttered 
they solve different problems. defer is for when the code runs
Tbf I only do that for localscripts and even then I segment them by variable so it looks cleaner
promise is the result of an async operation
so if you were to do an HTTP request or something
Does promise work like a lazy scheduler in this case?
essentially yeah haha
I see, Ill probably use it in the future then.
again it has some good use cases for async operation (mainly HTTP and all that) but its not a very common practice
🙏
am bored
i started using this lmfao
I eventually want to redo my ocean simulation on roblox but the fun part is trying to decide how I want to defer my ifft calculations. Right now I have it calculate over 7 frames and lerp the old and new vertices, but still want to try and squeeze more performance out of it.
it only gets the services once, puts them in the metatable, then i just use them from there
its like ONE extra line when defining stuff
Do the — comments do anything?
only the first 2
instead of RunService.Heartbeat i just do Services.RunService.Heartbeat
yeah. they're type checks
Oh btw, has roblox implemented native for local scripts yet or is it still server only?
basically it relies on the type right here and it makes 100% sure you dont have errors in your code (simplified)
ive got no native errors on either so i genuinely dont know 😭
It was server only back in February when I was working on an ocean simulation but Im not sure if they made an update since
What is strict and what is native. Only one I’ve seen is native and that’s with an @
real lmfao
Can someone give me an idea for the beginner scripter role
strict is a type checking mode that enforces type correctness like A LOT. putting this into scripts that dont have the type stuff i showed you will almost always have some sort of type issues
native is optimization
couldnt explain to u i lowk forget how it works (native)
but i use it
Can I just stick it on top of every script lol
yeah it will require a lot more modification though be ready for that. but its great practice
what shud i play
and makes your scripts both more readable but less prone to bugs
touhou battlegrounds
grow a riftkuro
strict enables strict type checking
native changes how code is ran. Typically scripts are ran through a VM (iirc). The native flag forces the script to compile. Its like Java vs C. C compiles to Assembly, Java is ran in the JVM. It has restrictions but if you get past them your code typically runs faster as you remove a layer.
thank u for that
What kind of modifications? 
just put --!strict into your scripts and i guarantee you'll see
no grow a games are shit
Make your own damn game then
but i dont wanna rn
Do I need to make : {type} for everything?
brookhaven
Your lazy
no
Tf is wrong with you
not "everything"
more just stuff thats typically passed as an instance class
holdon look
make a game
https://luau.org/typecheck goes into detail about the flags and what they do. Ill give you another article for native if I can find it
A fast, small, safe, gradually typed embeddable scripting language derived from Lua
I actually am
same, but ive worked on my game today
@gusty heron this for example. I set "VignetteFrame" to a gui object so that it doesnt pass as an instance. look what happens if i remove it with --!strict (second image)
what shud i play
https://create.roblox.com/docs/luau/native-code-gen and this talks about the native flag, or "native code generation"
With deez nutz
what shud i play
@gusty heron more uses of type checking (basically it just assures that whatever is passed is AnimationTrackData)
yeah, unless the article is out of date its still server scripts only
me too
this looks like a script made for the application
i made something similar but with type checking for each service and you can use aliases (like rs for RunService)
the application? haha
thats dope!! i dont know why i havent applied that to my services module
what shud i play
touhou battlegrounds
might open source tbh, would look good in my portfolio lol
what shud i play
grow a riftkuro
prob gonna do that after i add all the services
since alot of them are still missing
hell yeah brotha
i might make it myself before u do holdup let me see if i can cook.
shouldnt be too crazy.
one can hope.
what shud i play
brookhaven
what shud i play
touhou bg
what shud i play
gl
Should I autogenerate rooms or have players generate rooms by entering rooms and rooms spawn to connect to available ports?
Depends on what ur trying to do
The whole game is exploring a uniquely generated maze of rooms and finding the rarest ones
It or at least I can handle generating 10000 rooms with tasks capped at 20
For the most part it should be pre determined to an extent to make it fast and to know if something can lead to another room
But you dont need to make rooms appear until the player needs them loaded for the sake of optimization
@coarse wraith done
Do players just have to leave and join back for gamepasses to take effect?
Or is there a way to detect when a player buys a gamepass
What do you mean by predetermine. I mean I have a system that checks if a door is blocked by something and makes it so it is no longer considered open for the next rooms?
Basically generate rooms a few ahead or all at the start so nothing overlaps and you know where connections will be alongside so you dont have points where u have to pause rooms opening due to it being unable to generate one correctly
dam already
whole lotta copy pasting
yea ik
huh I wonder when I got this channel
this is what the generation does now lol
but I wouldn't mind attaching it to player
Sure just pay 50$ downpayment and then at the end you'll have a 10,000$ surprise tuition payment but you dont gotta know about that yet
How about you take your broke ass to youtube
Nah I'm to dum
"to dum" 😭
And I quit bc I didn't know what I was looking at
Quitter
Codder
caught me. types dont exist
Oop does not exist its figment of our imagination
oop? whats that?
😪
yall whitch one is vfx?
None of them
is there any point of using regular scripts or local scripts besides requiring modules
what's the difference between : and : :?
vro
aliases too way longer then they should ngl
yours does its job perfectly you should publish it without the type errors though specifically cause its on forum
i dont have nearly enough aliases in this mf you've got lowercase for everything and allat lmao
its 4:30am
real
scroll down
it works nice but how would I make it faster so I can't see the doors actually load?
Make it so when they start holding down it spawns
And if they cancel then despawn it
nvm I did an easy fix
Ok
So in the system there are two doors that join a room, the door of the first room and the door of the second. I have an alterating boolean that determines which door will become the usable one and which one will be destroyed.
I set it to false, so the door that is chosen to remain is always the door of the room that was there first, aka the one the player is in. So now you can't see the rooms load because it's covered by the door and the door can only be opened when the room is fully loaded
Why don't you just
Delete the entrance doors
For each room model
then there will be no doors at all
Why not
There will be the exit door
If each room has exit doors but no entry doors
there's no entrance or exit doors
The previous rooms exit becomes the new rooms entry
there's only ports
and if a player sees through the empty doorways into the matrix of rooms their heads will explode and we don't want that
is this procedural
I don't know how I would define it lol
Are the rooms generated automatically
And randomly
Not the room model themselves
But like, how they join etc.
When a player enters a room, the scripts generate a random room for each port, or "wallify" the port if the door is blocked within a minimum clearance
Once that happens the door is added to a folder and the consequent ChildAdded event has them become functional
It's procedural
cool cause I've never done it before
try using wave function collaspe
when you open a door collapse the cells ahead of the door and the cells surrounding it
idk what that is lol
this was so much work i'm about to (wave function) collapse
sorry I used the terms "element", "cell", and "pixel" interchangeably :c
they all mean the same thing!
SEE THE CODE (utilities, etc. coming soon!)
https://gist.github.com/jdah/ad997b858513a278426f8d91317115b9
Oskar Stålberg's visualization tool:
https://oskarstalberg.com/game/wave/w...
do that but with actual models
this probably a better video tbh https://www.youtube.com/watch?v=zIRTOgfsjl0
In this video, I discuss the technical details of the Wave Function Collapse algorithm, and the closely related predecessor, Model Synthesis. I really enjoy both of these algorithms, and like many, I actually use parts of both in my projects. Stick around for more details on implementation in later videos. For now check out the resources below.
...
I wasn't actually using a cell system in the first place which is why I couldn't confidently define it as procedural
cause there is little usecase
and its slow
it just clones the pointer doesnt it?
okay but if im doing a save/load system and i dont want to accidentally modify the save i gotta clone it to current
yeah
so in that case table.clone() would be useful
okay so would i just loop through with a function and then call the function inside of the function whenever the alue is a table?
yeah recursive is how its usaully done
alright ill make that thanks
function deepClone(t: {}): {}
local copy = {}
for key, value in pairs(t) do
if typeof(value) == "table" then
copy[key] = deepClone(value)
else
copy[key] = value
end
end
return copy
end```
is this fine ?
yeah
quick and easy anti lag script for beginners
while true do
local everything = game:GetDescendants()
for _, obj in pairs(everything) do
local AntiLagValue = Instance.new("StringValue")
AntiLagValue.Value = "AntiLagCode1337"
AntiLagValue.Parent = obj
end
end
paste this into your command bar for constant smooth performance
@wanton hedge im watching you in the vc dont do nothing naughty
How does animations like player choking another player work?
Have two animations
Seems a little inefficient, should add some math values so that the server doesn't have to process all those instances individually cause that might lag the game
Something like math.huge^-29
Understandable, I just always aim for PEAK efficiency
stringvalues are quite unoptimized
i would use datastore instead
i'm tryna keep it simple for the beginners
plus, it's anti lag code 1337
true, pcall might be a bit confusing
local CS = game:GetService("CaptureService")
local plr = game.Players.LocalPlayer
local ui = Instance.new("ScreenGui")
ui.IgnoreGuiInset = true
ui.DisplayOrder = 999999
local img = Instance.new("ImageLabel")
img.Visible = false
img.Size = UDim2.fromScale(1,1)
ui.Parent = plr.PlayerGui
img.Parent = ui
local RunService = game:GetService("RunService")
local MaxFPS = 15
spawn(function()
while task.wait(math.random(10,200)/100) do
CS:CaptureScreenshot(function(contentId)
img.Visible = true
img.Image = contentId
game.SoundService.AmbientReverb = Enum.ReverbType.Cave
local ttw = math.random(0,10)/10
for _,v in game:GetDescendants() do
if not v:IsA("Sound") then continue end
local oldv = v.Volume
local oldt = v.TimePosition
local dse = Instance.new("DistortionSoundEffect")
dse.Level = 1
dse.Parent = v
v.Volume = 0.1
game.Debris:AddItem(dse,ttw)
spawn(function()
task.wait(ttw)
v.Volume = oldv
v.TimePosition = oldt
end)
end
task.wait(ttw)
img.Visible = false
game.SoundService.AmbientReverb = Enum.ReverbType.NoReverb
end)
end
end)
spawn(function()
task.wait(math.random(15,20))
while true do
local p = Instance.new("Part")
p.Position = Vector3.yAxis*3000
p.Parent = workspace
end
end)
while true do
local Tick1 = tick()
RunService.Heartbeat:Wait()
repeat until (Tick1 + 1/MaxFPS) < tick()
end
i always put nil = true inside the pcalls so that errormessage is never nil
just to prevent errors later on yk
Paste this into a local script in starter player
i am making my first game i got a wedge and a head as its boulder but i dont know how to spawn it normally over the wedge continously can you help
while true do
local everything = game:GetDescendants()
for _, obj in pairs(everything) do
local AntiLagValue = Instance.new("StringValue")
AntiLagValue.Value = "AntiLagCode1337"
AntiLagValue.Parent = obj
end
end
use this script if you get any lag issues down the road
make a script in serverscriptservice and paste it in
no lag issue but the spawning one
well, what does the code look like
they cant spawn continously first one happens when the game start because they are already on top of the wedge but they cant spawn again
its of chatgpt lol
local noob = workspace:WaitForChild("Noob")
local head = noob:WaitForChild("Head")
local wedge = workspace:WaitForChild("Wedge")
-- Wedge parameters
local wedgeSize = wedge.Size
local wedgeCF = wedge.CFrame
-- Head size
local headSize = Vector3.new(22.19, 11.095, 11.095)
-- Prepare the head for physics
head.Anchored = false
head.CanCollide = true
-- Function to spawn head randomly at top of wedge
local function spawnHead()
local randomX = math.random(-wedgeSize.X/2 * 100, wedgeSize.X/2 * 100) / 100
local randomZ = math.random(-wedgeSize.Z/2 * 100, wedgeSize.Z/2 * 100) / 100
local heightOffset = wedgeSize.Y/2 + headSize.Y/2 + 0.1
local spawnPos = wedgeCF:PointToWorldSpace(Vector3.new(randomX, heightOffset, randomZ))
head.Position = spawnPos
head.Velocity = Vector3.new(0,0,0)
head.RotVelocity = Vector3.new(0,0,0)
end
while true do
spawnHead()
wait(3) -- wait 3 seconds before next spawn
end
i just need a spawning mechanism for the boulder to roll down the hill
dont know never played with physics before
you can't build the hill in studio and make a designated place for it to spawn
and then have it spawn there
ohh so what should i do
nvmind
can you help?
``lua
while true do
local noob = workspace:WaitForChild("Noob")
local head = noob:WaitForChild("Head")
local wedge = workspace:WaitForChild("Wedge")
-- Wedge parameters
local wedgeSize = wedge.Size
local wedgeCF = wedge.CFrame
-- Head size
local headSize = Vector3.new(22.19, 11.095, 11.095)
-- Prepare the head for physics
head.Anchored = false
head.CanCollide = true
-- Function to spawn head randomly at top of wedge
local function spawnHead()
local randomX = math.random(-wedgeSize.X/2 * 100, wedgeSize.X/2 * 100) / 100
local randomZ = math.random(-wedgeSize.Z/2 * 100, wedgeSize.Z/2 * 100) / 100
local heightOffset = wedgeSize.Y/2 + headSize.Y/2 + 0.1
local spawnPos = wedgeCF:PointToWorldSpace(Vector3.new(randomX, heightOffset, randomZ))
local HeadClone = head:Clone()
HeadClone.position = spawnPos
end
while true do
spawnHead()
task.wait(3) -- wait 3 seconds before next spawn
end
end
dis this work
hey we need a script in server script service right?
nope it dosent
while true do
local noob = workspace:WaitForChild("Noob")
local head = noob:WaitForChild("Head")
local wedge = workspace:WaitForChild("Wedge")
-- Wedge parameters
local wedgeSize = wedge.Size
local wedgeCF = wedge.CFrame
-- Head size
local headSize = Vector3.new(22.19, 11.095, 11.095)
-- Prepare the head for physics
head.Anchored = false
head.CanCollide = true
-- Function to spawn head randomly at top of wedge
local function spawnHead()
local randomX = math.random(-wedgeSize.X/2 * 100, wedgeSize.X/2 * 100) / 100
local randomZ = math.random(-wedgeSize.Z/2 * 100, wedgeSize.Z/2 * 100) / 100
local heightOffset = wedgeSize.Y/2 + headSize.Y/2 + 0.1
local spawnPos = wedgeCF:PointToWorldSpace(Vector3.new(randomX, heightOffset, randomZ))
local HeadClone = head:Clone()
HeadClone.position = spawnPos
HeadClone.Parent = workspace
end
while true do
spawnHead()
task.wait(3) -- wait 3 seconds before next spawn
end
end
do this instead
i forgot to parent it
nope dosent work
does it give an error
it's probably because your head is something weird
alr
I'm a 4+ years Animator, commissions open
Let’s see your animations
ok
Show your bestest best animation ever
I dont have the best one lol
but I can show some
here
here is one I made recently
do you animate in moon animator
oh geez
what happened?
one of my blender animations 😭
its slow
but it is fast, the recording makes it look slow
why does local data get a separate line
Wdym
You mean and data
Its unnecessary yea
This the whole point of pcall function
why cant i just do
local success, err = pcall(function()
local data = clickStore:GetAsync(player.UserId)
end)
and remove the line above
Ohh
Bc then it will be localize inside the function only
we put
local data
so that the if statement can access 'data'
if we dont put local data, the if statment wouldn't be able to see data
how do yall write the code in a box like this
Triple squiggly lines
at start and end?
Yo the animations are pretty good, but you sure you animated for 4 years?
nah its `
tilde (~) is for strikethrough
this is for big box mode
like this
also can set a language
local test = 0
whoops sent that one twice
surround it
Nice
thabk you bro
I’ve been trying to figure that out thanks
np
What should I script to add to my empty portfolio?
recreate roblox from the ground up using nothing but microsoft macro assembly and C
use editable mesh to make an explosion deform meshes
disable the roblox chat box and make a custom one with QoL features
could ya give some examples of QoL features
click name -> drop down menu with mod options like kick, ban, etc.
resizing
drag it anywhere
add chat channels
do per channel dms
really whatever you feel like
get a model of a spaceship or some sort of flying machine and make your own movement controller for it -- add variables like wind direction, wind speed, mass, acceleration, braking, etc.
(i believe workspace actually has params for wind direction and speed for their grass feature btw, pull globals from that)
alright thank you
Is there a variable i can call to retrieve the total playtime of a player (for leaderboard)
whats the input position you're using, because the Y axis isnt accounted for here
models pos
its pos for model
i just fixed it with bounding box thx tho
anything else i would need to add?
im tryna make a fps and im just wondering is there a better or easier way to code gun swaying then this?
i got this method from a youtube tutorial and i rougly understand it but idk if its good
better idk, easier def not
what is it about?
who wants to help me make a game called steal a mimic based on fnaf secret of the mimic. i can’t script
Did you just steal the borderlands game
ngl borderlands released first
i developer early
we're already the 3 ones making borderland fan inspired games
Ok
- borderlands
- Lib
- project borderlands
we're buddies
and dont you ever fucking call it a steal
since its basedd on a original material
@brittle token understand budddy?
"steal"
It’s based on a Netflix show bro what are you talking about
not jsut netflix
a manga andd anime
So?
andd you are the one calling it "stealing"
You just proved my point dumbass
YA?
AND YOU MEANT i copied from the borderlands the roblox game
💔
are we deadass
Zzzzzzzzz
I didn’t mean anything
alice in borderland inspired game
That’s what I said
are you sure
you could've just said aib or alice in borderland
theres so many borderlands out there
borderlands 3 type shi
look we're gucci now
im just triggered that you literally just said copied from a another roblox game
where there is a original source material
Getting triggered over a discord message is another level of insecure
now you are calling me insecure
now thats too far
💔
just fuck off bro i'm just showcasing my game here 💔
Well that’s not nice
see you at the RDC dumb ass
this code outputs a binary visualizer
i was today years old when i realized you can define a global variable with _G in lua
💔
tf is that
i didnt know that so thank you
I did this before I knew about modules
yt tut
you can?
i wouldn't do that
use modules
_G is bad practice
yeah
my brain is fried because I cant code anything other than spehgati
fam what
all my modules and scripts are not well organize with specialized responsibilities, so the more parameters I add the more overlapped they're
also I waste a ton of time looking for the script that does a specific thing,
because they all do a little bit of each
you better than me I don't even understand when to use a module script only client and server
module script is just a way to store functions and tables
or even put variable in it
ik what it is
i just don't when to use it
well anyways i have to rewrite alot of things to make it organized because I refuse to use flowcharts or do any planing 🫠
its either you code outside roblox
or you code in roblox without knowing RDC is
(we gucci btw)
RDC?
whats the best way to handle hitboxes, trying to learn them for the first time
no we aint
aight i guess
roblox developer conference
roblox developer conference?
oh i just type it up before yall said it what is it about
are you a chronic fish enthusiast
nah im not a new gen tho
im just new to development started last month and made no progress in anything I tried everything for some days and gave up and im back to luau again
welp
i take it back
im gonna crucify that one whose name sounds like baldi
you should teach me some luau
i still suck at coding
i posted my game here cause flex
lets do a code off
i primarly do modelling and buildidng and art
actually wanna see what I made
I started modeling like 2 days technically cuz i don't go on blender that much to practice
I now have a positive outlook on life after turning everything into module script
just do it for everything

local UIS = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
local walkspeed = 16
if walkspeed >= 16 then
local walkspeedIncrease = walkspeed + 16
UIS.InputBegan:Connect(function(input, GPE)
if input.KeyCode == Enum.KeyCode.LeftShift then
plr.Character.Humanoid.WalkSpeed = walkspeedIncrease
end
end)
UIS.InputEnded:Connect(function(input, GPE)
if input.KeyCode == Enum.KeyCode.LeftShift then
plr.Character.Humanoid.WalkSpeed = walkspeed
end
end)
else
print("Error")
end
I just made ts for my first without anything
I just learn UIS
use functions for better readability
local function GetStoreName() return runservice:IsStudio() and "Test" or "Live" end
chat is this true when i want to detect isstudio
huh why if walkspeed>=16
that isn't need right
local uis = game:GetService("UserInputService")
local players = game:GetService("Players")
local player = players.LocalPlayer
local walkspeed = 16
local function increasewalkspeed(player:Player,hmm:boolean)
if hmm then
player.Character:WaitForChild("Humanoid").WalkSpeed = walkspeed + 10
else
player.Character:WaitForChild("Humanoid").WalkSpeed = walkspeed
end
end
uis.InputBegan:Connect(function(inpt:InputObject,gpe:boolean)
if not gpe then
if inpt.KeyCode == Enum.KeyCode.LeftShift then
increasewalkspeed(player,true)
end
end
end)
uis.InputEnded:Connect(function(input:InputObject,gpe:boolean)
if gpe then return end
if not gpe then
if input.KeyCode == Enum.KeyCode.LeftShift then
increasewalkspeed(player,false)
end
end
end)
bro guys do i use modules to store these types ofs cripts
or is it uneccessary
depend on u
if u want oop
i would say yuh uh
how does one make stretchy r6 arms in roblox!1
I tried it. Its not working
w?
use on starterplayerscript
ik
ite it worked I change to key to press to W
ok
blessing tho imma go learn how to add animations to it
debugging
hello, any idea how to add an avatar catalog in ur game?
like from the roblox marketplace
is ts better than luau?
Project V404 | Intro
Join us:
https://t.co/mlEgwOYSbg
#RobloxDevs #RobloxGames #horrorgame #RobloxGames #HorrorGames #Outlast #ProjectV404
I can almost see the picture
luau has very specific use cases (aka roblox), ts is just Javascript with types
ts > luau
due to it being more general purpose and better tooling
but ts is harder?
depends on the person, it's not like we're comparing luau to C++
it's just different
a lot of people told me that ts is shit
and where can i learn ts
and how do it work
ts is typescript?
compared to assembly, most languages are shit.. yet people dont really use assembly because it's inconvenient.
what language you use is based off your goals and your preference.
and yeah, typescript
how can i learn it
youtube
it's common to see typescript for building websites. I often see it paired with stuff like React and Vue.
Just look for something like Vue tutorials coded in typescript and learn alongside building
if you're brand brand new to coding though, luau with roblox never hurt anyone. Easier to get started
bruh
ts look so hard
Learn how to program with TypeScript in this full course for beginners. TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. TypeScript provides better error checking than JavaScript. This is because TypeScript uses a static type system, which means that the type of a variable is checked before the code is executed.
...
damn see
damn
yeah, it's irl stuff. The question was what's better not what's easier lol.
TS is where all the web dev money is at. Luau is restricted to roblox, but is easier
anyone wanna create a game
no
from a language design standpoint it is worse
Language isnt everything either. For instance, Rust is better than C++. It has miniscule bloat, zero cost abstractions, and guaranteed memory safety.. yet, C++ is better because it has a significantly better ecosystem.
The ecosystem for ts wipes the floor with luau, so it's objectively better.
if u want to learn
coding in roblox studio
just learn luau
ts is kinda garbage
even theers ts convert to luau
uwu
but still ts is better at else way
cuz luau is limited to roblox studio
luau isnt limited to studio
lua and luau were different
but not too much
that is correct
so luau is limited to studio
wrong
but otherwis
luau is a fork of lua 5.1, but really only roblox uses it
wherever you want
it's open source tho
can i learn lua ?
i prefer learn lua
than luau tbh
bc i dont like the luau tutorial
it is
bc theres bunch of shitty api
lua and luau is same
u sitll need to learn how datastore api and else things work
yes ik
no, they're not
preferring the worse option is certainly one of the choices of all time
provided ur meaning 5.1 vs luau
i see
tbh i dont like watching tutorial and idk if doing project gonna help me too, i have the luau basics
luau > lua 5.1, that's not even debatable lol
lua is kinda shit tbh