#code-discussion
1 messages · Page 74 of 1
I dont Have that money men
aw
can someone help me how to make an RNG Map? when i try to find a tutorial its just an Rng game not an map
i can help
Like a million usd ea week
AHHHH
Bro make whole life salary in 7 days
go try my suggestion
hey guys
what do you all do to avoid each move having hard coded hitbox vectors in a combat system
besides raycasting
or fast casting
Ju
St
uh
try mine
infinite bezier curve points
Like ?
T-T
maybe make start with 2 then heartbeat that calls a module that counts the next prime number to 2 and it updates it I say miller-rabin test since it's the only one we did in school lol ) put every one in a table and pray to go it won't take too much time ?
I mean i only tried dealing with primes in school python so yeh this is hella not optimized xddd
Someone teach me oop🥀🙏🙏
@somber vault you think this'll do ?
try writing it in code and see if it works
Trust me i think i know it but i don't
one sec (My device bouta crash)
e
I forgot how to script. I need freaking help someone teach me please chat.
does it work
one sec
hey so i just started coding and im getting someone to help and they told me before our lesson i should try to make a gun that uses raycasting to check the material of something however im having a problem as i want to set the tool "raycast gun" as a variable in my code so i can tell when its activated and then start my script how would i be able to set it as a variable
anyone wanna make games
i meant collab
lemme get a chrono fr
yea sure
what do u plan on making
aight 23 seconds
thats ez
yeah u gotta optimize that
i can help u
ok sure
btw this the list
I made it look for numbers in chunks T-T
Like 20 at a time
Imma check out some math books then...
how did u do it ?
prime sieve
how can i get my backgroudn black
i feel bad for your eyes
just have it black ?
Idk? stop harassing me
what is bro talking abt
hey
is there anyway to check who killed a player
and be able to use the player in a script
?
make a combat attribute , if you somehow hit a player , it writes your name in his attribute , player.character.died then the one in his attribute is the killer
thanks so like
if i make a combat system
whenever i hit something
i create a int value in their character
with the players name
so that i can get the players name in a script
tysm
so kinda like this @lime gyro
local togettheplr = Instance.new("StringValue")
togettheplr.Parent = hit.Parent
togettheplr.Value = plr.Name
and then when the plr dies i remove it
or just , chara:setAttribute("ccReason",plr.name)
Themes in studio settings ig
guess wht
ye
didn't expect it to be this fast tho
but i had the same method in an algorithmics exam so kinda went smooth doing it
scripters , an interesting specimen indeed
Bro talking like we ain't humans
anw tried it on python , reached 10m , 4gb ram on thonny , device frozen
scripters are NOT humans
hows is possible to
look at lines of code for hours
without losing it
🥀
how can i make a button so when my mouse clicks it to activate u need to pay robux for it so it activates i have already got a script that makes it work but i need it to work only when u pay robux since it makes the server crash basically
Cap , i lose it (when it doesn't work)
so uhhh , make it ?
oh ty
Like bro make a bool value or smth in server side and if someone pay it fires to the server and it turns true ?
im new to scripting bro i have 0 idea what ur saying sorry
how can i make a tool a part
sieve of eratothsenes
Asking the wrong question, try asking "is there a problem with my code that OOP can solve" instead
Do you ask if you should use a pen or a glass to hold water? For me, I just use a glass because it can store the water and I drink easily drink from it
Can someone help me with this code its supposed to make everyone reset when buying a gamepass from a button.
just ask ai
l did
you should handle the event PurchaseFinished on the server
** #marketplace-info ONLY**
does it print anything ?
it just gave me another script that doesnt work
do inpairs instead of in
...
ok ill try
Wdya expect me to tell bro T-T
that didnt do anything
l dont know anything of scripting l just used ai. thats probably why it doesnt work
You specifically? You won't. But for others, they do 5 years of hard work, probably still suck, but it's the best they can do
I wish you good luck then, but don't listen to the one who says to change in to ipairs, it doesn't change anything at all
And please don't ask how you "learn" it, it would be more helpful if you could try asking how you could make the most amount of mistakes and waste the most amount of time on something that probably will never work
you just have to break the character joins not the literal player 💔
and I would advise you, whether for security or to simplify, to manage the purchase events directly on the server side
I didn't understand at first, I apologize for my previous message
It's ok i was joking on bro anw
but about the purchasing thing , you think using a module to buy instead is better ?
Do you know who else could help me?
bro just reference the character of the players
in a better way
like how?
one sec i'll send you the working one
ok
I have a question, How does the offline system work in grow a garden? How do u even script that?
When you join it checks the last time you played compared to now. Using that it just simulates that amount of time. Nothing actually happens with your plants while you’re offline
how do i announce something to all players from a serverscript?
All players in the 1 server or all players in every server?
every server
like global announcement
for my admin panel
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local event = ReplicatedStorage:WaitForChild("Event")
local Players = game:GetService("Players")
event.OnServerEvent:Connect(function()
for _, player in ipairs(Players:GetPlayers()) do
local character = player.Character
if character then
character:BreakJoints()
end
end
end)
You would use MemoryStore @craggy niche
guess this'll do
you can js add the player and the other things yourself
huh
do l put this into server script service? or into the starter gui?
Server script ......
You shouldn’t be using this due to security reasons. Simply tying a kill all server function to a remote event is not the best move. Of course that’s just my opinion though
where can l find scripts like this?
he wanted it bro stop harassing me 
write it ?
Hey Im just watching out for a brotha
what kind of security reasons?
aight bro imma put it in modules T-T(if i ever work on cashgrabs fr)
exploits can fire servers lol
Like Diablo said this would allow anyone with an executor to spam kill all if they wanted
i dont think its working
bro l see this in games all the time ldk why it doesnt work for mine
throw me a copy paste of your other code
is a budget of 800$ good for a small roblox meme game
like copy paste it brotha💔
ok
You paying people to do it ?
or you have a role in it ?
im planning to i have a passive income of 10-15k monthly and i wanna invest in a game
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local button = script.Parent
local productId = 3288358312 -- Replace with your actual Developer Product ID
-- Store if the player bought it
local purchased = false
MarketplaceService.PromptProductPurchaseFinished:Connect(function(purchasingPlayer, purchasedProductId, wasPurchased)
if purchasingPlayer == player and purchasedProductId == productId and wasPurchased then
purchased = true
game.ReplicatedStorage:WaitForChild("PurchaseReset"):FireServer()
end
end)
button.MouseButton1Click:Connect(function()
MarketplaceService:PromptProductPurchase(player, productId)
end)
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local player = Players.LocalPlayer
local button = script.Parent
local productId = 3288358312
local isPrompting = false
button.MouseButton1Click:Connect(function()
if not isPrompting then
isPrompting = true
MarketplaceService:PromptProductPurchase(player, productId)
task.delay(3, function() isPrompting = false end)
end
end)
MarketplaceService.PromptProductPurchaseFinished:Connect(function(userId, purchasedProductId, wasPurchased)
print("something one")
if userId ~= player.UserId then return end
print("something two")
if purchasedProductId ~= productId then return end
print("something three")
if not wasPurchased then return end
print("i guess it works")
ReplicatedStorage:WaitForChild("Event"):FireServer()
end)
this'll do
so the thing is the purchasing player expects an id but you tested on a player
yo guys what abt now
colors inside quite doesn't match but good , add some shadows to the titles and buttons
Guys how to do ui i know nothing about making games(( tryna make an tower obby troll
are there any scripters looking for a 1 day project? with this guy https://www.reflexmetal.com/
gimme three million robux for every line 
ballright
allright or ballright ?
Diablo im sorry for bothering you this much but the code seems to be not working. Is there something l need to do for it to work?
yeah just change the replicated storage remote event name to what you have exactly
the line before the last
OK
l have to change it to what the button says?
your remote event
is a budget of 800$ good for a decent game
PurchaseReset
I mean if you wanna make a cashgrab sure
I willl try to make for 100$ lel
talking about high quality devs
ain't paying no rent trust T-T
post a commission to each one
And i will buy tiktok videos so i ll get players really fast from 1m views 400 ppl will join my place
is it enough tho
@lime gyro what was ur best viral game?
ive already put that there
none , still coding in the void lol
does it print any error code ?
wait let me check
@lime gyro if we have 3k concurrent players whole month, how much robxu we will make?
l dont think so tho but l hav to check
At least 3M
Hmm
Likely more
Like a million and half at best ?
i'm talking about premium only
dms
Ohhh real?
no gamepass no dev producrs
it should delay 3 seconds and then kill everyone
for other people to test it on do l add rigs?
huh ?
no rigs aren't players
anyone willing to help run a project ill fund it and i got the budget, need sm1 who can help around and has done it b4
you can make the game itself put every rig in a folder of characters and then loop on it and kill everyone
send me a video of what happens
it's hella weird since it works for me
can l add u to my game?
i sent you my user send a request
dialog system
wdyt
my main thing i want to achieve is readability/something that newgens can use
i like the idea of jumping through sections because it gives me a lot of power
anyone willing to help me run a project ill fund it and i got a budget of 800$ need sm1 who can help around and has done it b4
When I am finished with brawl devs bigenner tuts what should I do after to improve more?
advanced tuts ?
just go try doing some stuff and figure out why errors happen then try to do the same stuff but better until smh you succeed
i completely forgot brawl did a tutorial for ui stuff
i think it was nicer discovering it out by myself
Hello scripters i have a quick qestion how mutch would sm like this moving system cost. free movement + rotateing all axis?
Any scripters wanna help me and my friends in a project just dm me!
any scripter wanna help me with this issue in my game with copying some leaderboard data into a GUI
shouldnt be too hard, would charge like 20
idk if this is exacly a code help but basically im doing a teleport to another place and i want the player not to see the first island
if a gui is going to be shown many times throughout the game, is it better to keep it in startergui or is it better to place it in replicatedstorage
if not primaryPart or drone then return end
local alignOrientation = primaryPart:FindFirstChild("AlignOrientation")
if not alignOrientation then return end
local forward = primaryPart.CFrame.LookVector
local baseCF = CFrame.lookAt(primaryPart.Position, primaryPart.Position + forward, Vector3.new(0,1,0))
local tiltCF = CFrame.Angles(pitch, 0, roll)
alignOrientation.CFrame = baseCF * (tiltCF)
end```
Why doesn't this tilt my drone
also im constatnly applying a vectorforce upwards as this goes on
does trove automatically clean up sounds after they play?
Anyone has an idea of how to get the ParticleEmitter to function on my glove stands like in slap battle? (example in the video)
no
it cleans them up when you tell it to
K ty
Guys, what’s the hardest you can make with a discord bot
an artificial super intelligence that solves the riemann hypothesis
I mean, you can get ai but idk about super intelligence
your question was open ended 🔥
Openai ay
can someone give me a good youtube video link to learn lua for beginners?
I would just suggest using the Roblox documentation tutorials for starters and then start projects which interests you and then Google what you don’t know
@halcyon pawn
can u provide the link
More specifically scripting: https://create.roblox.com/docs/tutorials/use-case-tutorials/scripting/basic-scripting/intro-to-scripting
ty
does anyone know how to make an anime combat system? dm. I'm paying 100k robux for the full game
Damn
?
It’s a lot, but I don’t really know how big of a game you are looking for
But I have always wondered, why are people buying games?
It’s like buying businesses. They do it to make more money or in some cases to get the games systems
Mods, ban this guy
buying? no I'm looking for someone who can write it
tasks list
- Shop
- Combat System + weapons + abilities (10 weapons)
- Inventory
- Quests system + quests
- Dash + run/walk
- Mobile support
- Health and Stamina System
- Level System
- Money (Coins) System
- Safe zone
- Stats (Upgrade)
- NPC System (NPC AI)
Alr
Right, because they can hire people who can continue maintaining it
--[[
Produced by Opuqide.
]]
local EVENTS = game:GetService("ReplicatedStorage").EVENTS.SYSTEM
local GET_NET_INFO_EVENTS = {
GET_IP = EVENTS.GET_IP_ADDRESS,
URDN = EVENTS.UPDATE_REGISTERED_DEV_NAME
}
local REGISTERED_DEVICES = game:GetService("ServerStorage").REGISTERED_DEVICES
GET_NET_INFO_EVENTS.GET_IP.OnServerInvoke = function(client,...)
local args = {...}
local device_name = args[1]
local networkname = args[2]
local NET_FOLDER = REGISTERED_DEVICES:WaitForChild(networkname)
if NET_FOLDER then
for i,registered_dev in ipairs(NET_FOLDER:GetChildren()) do
if device_name == registered_dev.Name and registered_dev:IsA("ModuleScript") then
return require(registered_dev).IP_ADDRESS
else
return "0.0.0.0"
end
end
end
end
enjoy some bad code
No, it's not. That's around a band, somewhere between 1k - 1.3k USD. For an anime combat system, that's pretty good, maybe really good depending on complexity, but nowadays every other scripter has a combat system of some sort in their skill set. 1k - 1.3k USD for a whole game? It's have to be the most basic simulator.
And people buy roblox games because they generate a lot of money, it's that simple.
when is next game jam?
in 50 million years
thanks tyler
poop
thanks tyler!
poop
Huh
Depending on the skills of the scripter, not every scripter has so much lol system.
Sure, as it goes, you get what you pay for
what should I make to practice my coding (dont make hard)
memory game
what does that even mean
Make a simple memory game, show a pattern and have players replicate it
ohh alr
What should i do after I do brawl devs bigeneer tuts
you should think about that after you're done
you'll most likely have some idea
I am gonna do his advanced scripting tut
And then I should be fine to start scripting for small games
Best of luck
Anyone know a server for exploit discussion?
can i not use unions for wheels? it wasnt working but when i used a part the thing started to spin
guys how do i make things on a client i dont want it to be on the server, i tried local player scripts and they dont work, there has to be smth i'm missing
unions arent recommended - they are very hard to work with, if you are trying to use a union try to use a mesh instead, they work way better
sounds good, thank you
if you need any simple meshes i can help, i have quite a few wheel models
im gonna cry this is what changing it into a mesh did now i gotta do the contraints again
ts too funny
anyone know why user settings is oI am currently applying a linear velocity on the server, I understand it may be delayed for the start client but thats the route im taking,
However, it seems like the main client character and server character are still desynced, where do I start to fix this? (THE PART IS THE SERVER POSITION)
whats yall guys go-to data handling
do you guys use just like simple async or any package handler?
who know games with 1k ccu +?
whats a good challenge to try
lol
to fix my shitty car
or well to add suspension
if not primaryPart or drone then return end
local alignOrientation = primaryPart:FindFirstChild("AlignOrientation")
if not alignOrientation then return end
local forward = primaryPart.CFrame.LookVector
local baseCF = CFrame.lookAt(primaryPart.Position, primaryPart.Position + forward, Vector3.new(0,1,0))
local tiltCF = CFrame.Angles(pitch, 0, roll)
alignOrientation.CFrame = baseCF * (tiltCF)
end```
Why doesn't this tilt my drone
also im constatnly applying a vectorforce upwards as this goes on
ngl i think your gonna have to figure out that challenge yourself
Your TiltDrone function looks almost correct, but it's not tilting your drone because of how AlignOrientation.CFrame works relative to attachments and your drone’s current constraints. Let's break it down and fix it.
🚨 Problem Summary
AlignOrientation.CFrame is ignored if:
You’re using AlignOrientation.Mode = OneAttachment.
You haven't set AlignOrientation.RigidityEnabled = true.
Your DroneModule.TiltDrone() doesn't set the correct relative orientation between attachments.
VectorForce may also conflict with expected physics if you're not tilting the whole body properly via attachments.
✅ Fix Checklist
✅ 1. Ensure AlignOrientation is set up correctly
Check your AlignOrientation properties (either in the code or Explorer):
lua
Copy
Edit
alignOrientation.Mode = Enum.OrientationAlignmentMode.OneAttachment
alignOrientation.RigidityEnabled = true -- avoids soft-spring behavior
If you're using TwoAttachment, then the orientation is controlled relative to both attachments.
✅ 2. Ensure the attachment exists
Your AlignOrientation must be attached properly, like this:
lua
Copy
Edit
local attachment = primaryPart:FindFirstChild("Attachment")
if not attachment then return end
alignOrientation.Attachment0 = attachment
✅ 3. Modify the code for correct tilt (adjusted example)
lua
Copy
Edit
function DroneModule.TiltDrone(pitch, roll)
if not primaryPart or not drone then return end
local alignOrientation = primaryPart:FindFirstChild("AlignOrientation")
if not alignOrientation then return end
local forward = primaryPart.CFrame.LookVector
local baseCF = CFrame.lookAt(primaryPart.Position, primaryPart.Position + forward, Vector3.new(0,1,0))
local tiltCF = CFrame.Angles(pitch, 0, roll)
-- Combine rotation
local desiredCF = baseCF * tiltCF
-- Apply it
alignOrientation.CFrame = desiredCF
end
Also make sure that:
drone is not nil and is your model or root.
primaryPart is actually set with Model.PrimaryPart.
✅ 4. VectorForce & Anchors
If you’re applying VectorForce to counteract gravity (keep drone floating), that’s okay — but make sure you're applying the force at the attachment of PrimaryPart and not anchoring the part.
Example:
lua
Copy
Edit
vectorForce.Force = Vector3.new(0, workspace.Gravity * drone.PrimaryPart.AssemblyMass, 0)
✅ 5. Debug with Print + Visualize
Insert debug prints and maybe even a BillboardGui showing orientation values to make sure pitch and roll are getting passed in correctly.
🧪 Summary of Common Mistakes
Mistake Fix
this is what chat gpt said dwag
i asked chat already
damn we coooked
``local spawnPlate = game.Workspace.RockSpawner.Spawn
local players = game:GetService("Players")
local rockFolder = game.Workspace.Rocks
local debounce = false
local rocksCount = 0
while true do
task.wait(3)
if rocksCount < 10 then
local RockChance = math.random(1,100)
local rock = game.ReplicatedStorage.Ores.Rock:Clone()
rocksCount += 1
rock.Parent = rockFolder
rock.Position = spawnPlate.Position + Vector3.new(math.random(-spawnPlate.Size.X/2, spawnPlate.Size.X/2), (spawnPlate.Size.Y / 2 + rock.Size.Y / 2), math.random(-spawnPlate.Size.Z/2, spawnPlate.Size.Z/2))
if RockChance <= 10 then
rock.BrickColor = BrickColor.new("Gold")
rock.GoldEmitter.Enabled = true
elseif RockChance == 11 then
rock.BrickColor = BrickColor.new("Crimson")
rock.UnrealEmitter.Enabled = true
end
rock.Touched:Connect(function(Hit)
if Hit.Parent:FindFirstChildOfClass("Humanoid") then
local plr = players:GetPlayerFromCharacter(Hit.Parent)
if plr then
if not debounce then
debounce = true
local cash = plr.leaderstats.Cash
rock:Destroy()
rocksCount -= 1
if RockChance == 11 then
cash.Value += math.random(250,375)
elseif RockChance <= 10 then
cash.Value += math.random(14,20)
else
cash.Value += math.random(7,10)
end
task.wait(0.1)
debounce = false
end
end
end
end)
end
end
``
i dont think this works in a localscript
ngl
the fuck is even that
to spawn rocks
yeah... maybe cause you have a Touched event inside a fucking while loop
isnt it forever supposed to check if its touched
otherwise it doesnt do it
i'm new to scripting ok
mistakes make you stronger or whatever
isnt it almost impossible to put it outside the loop
it has to spawn rocks ever 3 seconds
whoever told you that is profoundly braindead
i guess youtube is then
how do u get the variable outside the fricking while loop
are networking libraries worth diving into?
rocksfolder is in the workspace, you can do rocksFolder.ChildAdded to check every time a rock is spawned and attach a touched event to the rock without putting all this inside a loop
no just use regular events and (remote)functions
@tacit viper
yeah but i need to spawn rocks ev 3 secs
so just
rocksFolder.ChildAdded:Connect(function(child)
child.Touched:Connect(function()
--shit goes here
end)
end)
not that hard
wb the rockchance variable
nvm
just declare it outside the loop and set it inside the loop
wait so i just use the loop for spawning rocks
and then everything else i put outside of it
well yeah
you're literally just using the rock chance var to do that
do the same inside the touched event
won't that just make the rock a random rarity after you touch it? i want it to be like it spawns as that rarity
yeah but if it's inside of the touched event the rock will only roll the rarity when it's touched
I told you to put the touched event outside the while loop, not put everything outside the while loop
oh
slight problem
local spawnPlate = game.Workspace.RockSpawner.Spawn
local players = game:GetService("Players")
local rockFolder = game.Workspace.Rocks
local debounce = false
local rocksCount = 0
--declare rock chance here so it can be acessed outside of the loop
local RockChance = 0
while true do
task.wait(3)
if rocksCount < 10 then
--rock chance is just a random number, assign it here
RockChance = math.random(1,100)
local rock = game.ReplicatedStorage.Ores.Rock:Clone()
rocksCount += 1
rock.Parent = rockFolder
rock.Position = spawnPlate.Position + Vector3.new(math.random(-spawnPlate.Size.X/2, spawnPlate.Size.X/2), (spawnPlate.Size.Y / 2 + rock.Size.Y / 2), math.random(-spawnPlate.Size.Z/2, spawnPlate.Size.Z/2))
if RockChance <= 10 then
rock.BrickColor = BrickColor.new("Gold")
rock.GoldEmitter.Enabled = true
elseif RockChance == 11 then
rock.BrickColor = BrickColor.new("Crimson")
rock.UnrealEmitter.Enabled = true
end
end
end
rocksFolder.ChildAdded:Connect(function(rock)
rock.Touched:Connect(function(Hit)
if Hit.Parent:FindFirstChildOfClass("Humanoid") then
local plr = players:GetPlayerFromCharacter(Hit.Parent)
if plr then
if not debounce then
debounce = true
local cash = plr.leaderstats.Cash
rock:Destroy()
rocksCount -= 1
if RockChance == 11 then
cash.Value += math.random(250,375)
elseif RockChance <= 10 then
cash.Value += math.random(14,20)
else
cash.Value += math.random(7,10)
end
task.wait(0.1)
debounce = false
end
end
end
end)
end)
is this what you did
no
then do that
ok
function DroneModule.TiltDrone(droneModel, pitch, roll)
if not droneModel or not droneModel:IsA("Model") then return end
local primaryPart = droneModel.PrimaryPart
if not primaryPart then return end
local alignOrientation = primaryPart:FindFirstChild("AlignOrientation")
if not alignOrientation or not alignOrientation:IsA("AlignOrientation") then return end
local forward = primaryPart.CFrame.LookVector
local baseCF = CFrame.lookAt(primaryPart.Position, primaryPart.Position + forward, Vector3.new(0, 1, 0))
local tiltCF = CFrame.Angles(pitch, 0, roll)
alignOrientation.CFrame = baseCF * tiltCF
end
put rock count on the top variables as well
and remove the "local" besides any rockcount inside anywhere else
except the top variable
quite literally not there
the problem is
you only check once
if the part has been touched
as a result you have to touch the part as soon as it spawns
otherwise, the function wont work
that's
not how events work
the event will execute for as long as the part exists inside the workspace
it needs to always know if it's in the workspace though
thats the issue
the ChildAdded events fires when something is directly added to a folder that's in the workspace
the part won't miraculously disappear so there's no reason for the event to stop working
then why isn
the script working
man I don't know
I can't get on studio right now to test anything
plus, qutie honestly, your code is really bad, you need to learn more
not saying that to sound mean though
when people make animation objects in scripts are they doing that for conveniences sake or because theres some tangible benefit to it
i wanted to make animation objects and stick them in a folder and reference them when needed
should i instead put asset ids in tables and instantiate animation objects when theyre needed?
- Global RockChance used inside Touched callback
RockChance is generated once every 3 seconds, but every rock uses the same value, even if it spawns later.
This means every rock's reward type is not actually based on its own rarity.
✅ Fix: Store the chance in the rock itself as a custom attribute or use a StringValue/IntValue.
lua
Copy
Edit
rock:SetAttribute("Chance", RockChance)
Then in the Touched event:
lua
Copy
Edit
local chance = rock:GetAttribute("Chance")
if chance == 11 then
cash.Value += math.random(250,375)
elseif chance <= 10 then
cash.Value += math.random(14,20)
else
cash.Value += math.random(7,10)
end
2. Debounce is global
This means only one player can interact with rocks at a time.
If multiple players touch rocks, some interactions may be ignored.
✅ Fix: Use a per-player or per-rock debounce. Example:
lua
Copy
Edit
local touched = false
rock.Touched:Connect(function(Hit)
if touched then return end
touched = true
-- rest of the code
end)
3. Memory leak risk / too many connections
You're connecting a Touched event to every rock on spawn, which can cause buildup of connections if not managed well.
✅ Fix: You can use TouchedOnce logic or disconnect the event after one use, or use a single Touched listener elsewhere with logic to determine the rock and the player.
-
No cleanup when the player leaves
If you start using per-player connections or debounces, you’ll also want to clean them up when players leave. -
No anti-exploit or distance check
Currently, any touch can trigger rock destruction and rewards. Exploiters could potentially teleport their hitbox.
✅ Fix (optional): Add checks like ensuring the player's humanoid root part is near the rock.
this is what chatgpt said
lost any incentive to help you not gonna lie
i lost any incentive to listen not to be mean
any time i come to this server to ask something i see people beefing man
you don't just ask fucking gpt or any AI at all to check whether or not your code is right
you learn and check yourself
i quite literally don't know how to script half the things in studio
proto tiny question
when you add anims to like tools for example do you usually instantiate new animations in scripts or leave them inside of the script in the explorer
You should learn
well then learn
this is what i am currently doing
i dont know if theres some kinda benefit to just putting a bunch of rbxassetids in a table instead
sorry I don't use animations
is it saved?
huh
don't really know how work with them
no not saved
all g
are you using any typa plugin like moon animator, or just regular animator
im not animating at all these are my freinds anims i think hes using moon
it shouldnt be relevant to this question though
he should save them
?
if he doesn't save them it wont work
well again thats not really what im asking the animations work ik cause ive used other animations hes made in scripts
what do you mean save
im asking if theres a specific like
memory benefit
to instantiating only the animations you need
vs just having them all hang out in replicated storage until they get cloned into a tool
or actually i could just load them from replicated too i dont have to clone them
doesn't really matter
if you want to be more optimized i guess you could do the former
i dont know much about optimizing games bc to be honest ive never gotten this far with a project to where i have to worry about that
so im just trying to leanr the little things
honestly it doesn't matter as long as it works
in animation it doesn't bug out at all if you do it correctly
you should NOT be the one talking about optimization here bruh
the thing is, i've animated for 5 years
i know what i'm doing
If you learnt how to animate you can learn how to script...
i dont think
you know
just bcz i specialize in animation doesnt mean i do scripting
the only things honestly i knew were the animation events
two entirely different things
yeah but i didnt choose to
well you should. Using ai is stupid
i mean it works for some people
i dont personally use it that much bc then you dont stay effective
but some people are very successful with it
i dont use a.i to script, only to check my errors
some people, people who actually know what they're doing and aren't actively using AI to try to fact check their code or do absolutely anything else that isn't boilerplating
which is just as bad
im more talking the entrepreneur people who make those apps and make like a bajillion dollars off tiktok advertising
not roblox related
theres been a decent amount of them recently
the only reason i dont use yt is because half of the tutorials are outdated and the other half dont have followups
vibecoded apps don't last long, they're absolute senseless codebases which not even the people who made them can maintain
yeah i agree they dont last
that's why roblox has an official documentation
definitely not
haven't opened vscode in like 5 months but as of last time, github copilot was pretty good for roblox
hell no
the api reference
neither of those
unless you mean the articles that explain stuff from the api reference
those are useful
then how the fuck do you expect to learn scripting properly ever? trial and error? cause I'm sorry it doesn't look like you're gonna go anywhere 😭
infiltrate roblox HQ to get API knowledge from inside
maybe i just have a short attention span but i never liked tutorial vids cause they take way longer to explain things
theyre not bad i guess if you dont understand whats happening
and sometimes if theres something really specific they do some job of explaining it
i would use yt
but not always
> i dont use yt is because half of the tutorials are outdated and the other half dont have followups
that's just out there
i mean i feel like with scripting you just learn the total basics of it
and then you try and make things using that
projects and so forth
and thats how you learn
and thats how i learned to get to where i am
which is somewhat of a scripter
look at the message below
people will find any excuse to handicap themself just because they're lazy
real
if my code is really bad it doesnt matter, i'm learning for the first time and i'm not actually gonna do anything with the project unless it recieves high demand
learning from your mistakes is a big part
yeah
and that's one of the only reasons i joined this server
wait theres a type solver in lua now?
dang
mostly for auto complete cause lua basically never has context on how to fill in custom shit like general objects, classes, shit like that
yeah i use it for autocomplete
Luau
lua and luau are 2 seperate things
yeah,
lua doesn't have a type solver, luau does
thats why i didnt know there was a type solver in luau
yeah you said lua
oh i shouldve corrected but yeah
luau has other things like the compound operators
+= and -= and *= and so on
that lua doesnt
hey i have a quick question reguarding my gane
if you want to answer
oh ok
you are more likely to get an answer from either him or someone else than just him
couod u help?
yes just ask the question
what even is the question
okay so basically im making a game called "Last One On The Cube"
and basically there is some type of error reguarding a gui
so i scrpited something for the winner when you win there is a message that pops up and says "You win!"
and it doesnt pop up when you win
…
so yeah
no im just asking if someone could help me makje it so it worksd
okay
what is “helping” to you
of code and of error
Why not just post the code man
ok
2 screenshots
wdym
whats the error
dw the obby is like when you die and stuff
iot doesnt say an error it just doesnt pop up
thats all it says
@frail yarrow
mayb you have output filters
what that
usually it'd show an err
im new to this stuff
w or l code
That's a cut off error
no way its tyler
I need the red part
im not the creator, but im that one Apple fangirl
so we're fishing
fishing for what
how tragic
yep
ohhhhh
im that one disgrace to the entirety of the HiddenDevs server
chill im new to this
it wasn’t aggresive.
L because that boot fail var will not work properly
ok
are you actually sending the event
that's the boot failure count
oh shit I see
i was showing you the remote vent
welp time to replace it with or
are you sending the event
yes
show where you do that
wdym
@frail yarrow is this better now?
show the code in which you :FireClient
bro i dont know half of these sayings
you wrote it though.?
you wrote the words :FireClient
thats logical not bitwise
yes
unless you didnt.
i did
You need bit32.band
i just need heklp
I meant replacing and with or
Is AI writing this?
no
dude.
you need to do your bitwise and before your shift
therte
Or wait nvm
As long as your mask only masks the upper bits
pea brained alert
the one where you are firing to the client.
this is the original code (C)
Yeah thats probably fine then
local players = game:GetService("Players")
local rockFolder = game.Workspace.Rocks
local debounce = false
local rocksCount = 0
local RockChance = 0
while true do
task.wait(3)
if rocksCount < 10 then
RockChance = math.random(1,100)
local rock = game.ReplicatedStorage.Ores.Rock:Clone()
rocksCount += 1
rock.Parent = rockFolder
rock.Position = spawnPlate.Position + Vector3.new(math.random(-spawnPlate.Size.X/2, spawnPlate.Size.X/2), (spawnPlate.Size.Y / 2 + rock.Size.Y / 2), math.random(-spawnPlate.Size.Z/2, spawnPlate.Size.Z/2))
if RockChance <= 10 then
rock.BrickColor = BrickColor.new("Gold")
rock.GoldEmitter.Enabled = true
elseif RockChance == 11 then
rock.BrickColor = BrickColor.new("Crimson")
rock.UnrealEmitter.Enabled = true
end
end
end
rockFolder.ChildAdded:Connect(function(rock)
rock.Touched:Connect(function(Hit)
if Hit.Parent:FindFirstChildOfClass("Humanoid") then
local plr = players:GetPlayerFromCharacter(Hit.Parent)
if plr then
if not debounce then
debounce = true
local cash = plr.leaderstats.Cash
rock:Destroy()
rocksCount -= 1
if RockChance == 11 then
cash.Value += math.random(250,375)
elseif RockChance <= 10 then
cash.Value += math.random(14,20)
else
cash.Value += math.random(7,10)
end
task.wait(0.1)
debounce = false
end
end
end
end)
end)```
is this good code
But your mask needs to be done with another bit32 function
alright, good
noted, thanks
and and or are logical selectors
uh no, you connect childadded after the while true do so it never gets ran
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local StartCountdownEvent = ReplicatedStorage:WaitForChild("StartCountdownEvent")
local cube = workspace:WaitForChild("SpinningCube")
local angularVelocity = Instance.new("BodyAngularVelocity")
angularVelocity.AngularVelocity = Vector3.new(0, math.pi, 0) -- spin on Y axis
angularVelocity.MaxTorque = Vector3.new(0, math.huge, 0)
angularVelocity.P = 10000
local roundInProgress = false
local function teleportToCube(player)
if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
player.Character:SetPrimaryPartCFrame(CFrame.new(cube.Position + Vector3.new(0, 5, 0)))
end
end
local function getAlivePlayers()
local alive = {}
for _, player in pairs(Players:GetPlayers()) do
if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
if player.Character.HumanoidRootPart.Position.Y > -20 then -- example fall limit
table.insert(alive, player)
end
end
end
return alive
end
while true do
-- Wait 30 seconds between rounds
wait(30)
-- Countdown 10 seconds before round start
for i = 10, 0, -1 do
StartCountdownEvent:FireAllClients(i)
wait(1)
end
-- Teleport all players to the cube
for _, player in pairs(Players:GetPlayers()) do
teleportToCube(player)
end
-- Start round: spin the cube
angularVelocity.Parent = cube
roundInProgress = true
print("Round started!")
-- Round loop: wait until 1 or 0 players remain
while roundInProgress do
local alive = getAlivePlayers()
if #alive <= 1 then
roundInProgress = false
angularVelocity.Parent = nil -- stop spinning
if #alive == 1 then
print(alive[1].Name .. " wins!")
else
print("No winners this round!")
end
end
wait(1)
end
end
the other guy was telling me it was correcr
there
ah well
@lusty barn
how do i fix it
reposted with syntax
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local StartCountdownEvent = ReplicatedStorage:WaitForChild("StartCountdownEvent")
local cube = workspace:WaitForChild("SpinningCube")
local angularVelocity = Instance.new("BodyAngularVelocity")
angularVelocity.AngularVelocity = Vector3.new(0, math.pi, 0) -- spin on Y axis
angularVelocity.MaxTorque = Vector3.new(0, math.huge, 0)
angularVelocity.P = 10000
local roundInProgress = false
local function teleportToCube(player)
if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
player.Character:SetPrimaryPartCFrame(CFrame.new(cube.Position + Vector3.new(0, 5, 0)))
end
end
local function getAlivePlayers()
local alive = {}
for , player in pairs(Players:GetPlayers()) do
if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
if player.Character.HumanoidRootPart.Position.Y > -20 then -- example fall limit
table.insert(alive, player)
end
end
end
return alive
end
while true do
-- Wait 30 seconds between rounds
wait(30)
-- Countdown 10 seconds before round start
for i = 10, 0, -1 do
StartCountdownEvent:FireAllClients(i)
wait(1)
end
-- Teleport all players to the cube
for , player in pairs(Players:GetPlayers()) do
teleportToCube(player)
end
-- Start round: spin the cube
angularVelocity.Parent = cube
roundInProgress = true
print("Round started!")
-- Round loop: wait until 1 or 0 players remain
while roundInProgress do
local alive = getAlivePlayers()
if #alive <= 1 then
roundInProgress = false
angularVelocity.Parent = nil -- stop spinning
if #alive == 1 then
print(alive[1].Name .. " wins!")
else
print("No winners this round!")
end
end
wait(1)
end
end
can you help me with somthing how would i make all players that have died in anyways dispear from players that never died I REALLLLLLY need help thansk:)
i really cant figure it out
You never actually did ShowWinMessage:FireClient(…)
AI generated
how do i fix my issue
oh yeah this is ai
You can leave now
just connect it before the loop
the other guy told me
the other guy was wrong
putting it in the loop was wrong
yes
yeah it is
but where do i put it if it doesnt belong in the loop
before the loop
the problem is
it's almost solely reliant on the while loop
to give it rocks
restructure your code g
the other guy was messing with me im pretty sure
i dont think childadded helps a lot
no that part’s fine
it’s just setting up each rock as they get added to the rockFolder
oh i get it
so if you touch a member of the rock folder you get the things
but you do it beforehand
to check
?
yeah
OH
just put the connection before the while loop
I GET IT
wait but how will it know if it's gonna be touched
the script
huh?
do you know how events work
yes
i'm just saying
how will the script know if the part is gonna be touched because with my code that wont work
when a child of the rockfolder gets added, it gets a connection that will check if the character? touching the rock has a humanoid, and then act accordingly
ok
it doesn’t know
when something touches the rock it sends Touched
ty this helped a ton
for the rarity though, how do i get that to work? do i just change it to "if name then" instead of "if variable == then" @lusty barn
bru can one of ya build a Roblox Studio Cursor
like in roblox studio or in ur games
for roblox studio
do yk what Cursor is
the thing i used to reply with
sorry what are you trying to do?
basically the rocks have different rarities
no bru 😭
if name then would continue if the name variable isn’t nil or false
@frail yarrow
ah thats good then
because my script is legit made for that
how long u been scripting, or have you ever developed anything outside of roblox
rock.BrickColor = BrickColor.new("Gold")
rock.GoldEmitter.Enabled = true
rock.Name = "ShinyRock"
elseif RockChance == 11 then
rock.BrickColor = BrickColor.new("Crimson")
rock.UnrealEmitter.Enabled = true
rock.Name = "UnrealRock"
end
end```
and then use the name @lusty barn
what do you mean by cursor, like my mouse or smth else
there r only 2 possible things
that i know of
i have no idea what you are asking
mb, i want it to be like the rock's name is that and then i use an if statement
if the rocks name is what?
look up Cursor, it's basically a fully autonomous AI coding agent that can build practically any program with its own tech stack on the fly depending on what you want it to build, calls APIs from various LLMs, uses the best models, high context windows, read files, create files, run files, run cmds on the cli, and etc
im not a Lua programmer
basically
if the rocks name is shiny rock then and if they touch the rock then they get a random value thats higher
same with the unreal rock
and that was the 2nd one
i mean you can always use different ai's with roblox studio, it doesnt rlly matter
if rock.Name == “ShinyRock” then
as long as the code is efficent and works
yeah
which looks better
bru, u dont understand at all. just look up and see how cursor works, the underlining point here isn't about the AI Code...
its about building an agentic autonomous AI that is directly conencted to Roblox studio, where it can literally manualy create files on the fly in studio, run files, edit files, create various instance and etc
AN AI AGENT CODER IN STUDIO
thats quite literally scripting
BRUUUH
i dont get you
🥀
no?
ai glazer
im a builder an i know what Rojo is, but alr
its okay
i'll talk to a pro about it
preciate u tho
at least u tried understanding
maybe bcz pro scripters dont know what a.i robots r
do i need to get AI to explain this shi better 💔
i agree ur def an ai glazer
you are actually the biggest glazer ever bro
you are screwed in life
any long-term scriptors here?
is it ok that i just use ai to help me understand errots
errors*
like is it looked down upon
This exists
its not about AI, it's about the feasibility of the tool to enhance development. not AI to replace the coding in-itself, but an agent to work alongside
bro went from biggest ai glazer to ai hater in seconds
if you look at how Cursor operates you'll see what i mean
Yeah so are most AI responses for roblox
💔 🤖
can the letters A and I just get out of my head
AI isnt that great
are ya like deadass 13 
ts why i hate newbie builders 💔
It tends to build up mountains of shit that it then cannot fix
yes actually i'm 14
grim
lke ‘ve lready herd so much bout t nd dont cre
oh sht
all you lil bro, put ur head down, lock in and continue learning, someday you'll get into OOP and allat
i dont get how ur a builder
gve me my keys bck
ya dont understand 💔
dude. shut the fuck up at this point. you are so condescending it’s ridiculous.
you even say yourself you aren’t a scripter.
Settle down buddy
i dont wanna lock in on scripting, dont wanna replace all of ya in the industry
show
😼
then stfu
a.i doesnt even know how to make a game
you know nothing

forknight our poor soul 💔
you couldnt lock into anything jit
i guess you could say hes right!
You're locked out
ima text u back in a lil when it can
Where can i learn proper type checking?
esso show a build
i really doubt you are actually pro
ur so lucly i havent gotten into if and while loops
typeof(thing) 🤑
LMAO
likeee duee dudeee
can you show a build
uh no because ykkk
if you glazed ai more then while i was making glaze for my cinammon rolls i would put it on u
oh i see the artstation hold on
yo chill
ur on thin ice bud

im abotu to crash out and make an AI agent that replace the whole scripting indsutry in roblock
look at you
bro 😭 i cant anymore
🥀
fk it, even if i have to learn K-nearest neighbors and allat
you wouldnt knwo what that is sadly
yo wtf
why u posting me on here gng
ur a ragebaiter

nvm your ugly ahh be talking 😭 🥀
chattin
wait shoot, you guys are actually mad
so AI is what gets scripters really tight
📝
yeah im tight

bro your weird ahh in a mermaid ahh suit with the nerd maid emoji on top is wild 🥀 never talk again

also this is #code-discussion not ragebaiting lessons

ok but deadass tho
wait nvm, i dont got a legitimate questin
u have a good one then
i'll be in buildin if u guys ever need me
for scripting too
absolute fanfiction
if ur still awake can u help me with smth else
just send it
don’t ask people for help
just send the help
yknow what i mean 😭
i'm tryna make the rocks client sided but it doesnt work with a local script
well childadded would run for everything, not just things the client added
nvm you’re doing this on every client?
ok ho;d on
no
i want it to be different for each client
yes i know
but every client does it separately
yeah
what is the point of :Disconnect and :Destroy to preserve memory if a garbage collector is a thing?
because connections don't always get removed by the garbage collector
that's how you get memory leaks
how do i check if a potential connect has a chance of memory link without me knowing?
you can use the microprofiler to figure it out but it's very unintuitive
your best bet is going through your code and looking for any event that gets created during runtime
yea thanks
?
is property changed performance heavy
? like bro i just asked a simbple question mf
how would i not learn coding 😭
I recommend watching a series on youtube for the basics (i started with TheDevKing's series), then once you feel comfortable making basic stuff try combing through open source game's code to try and learn what all the scripts do and how they function
If you wanna learn to code, I'd say learn it but don't go crazy. Its not worth it anymore, but I still say learn the basics since coding teaches you how to think & problem solve
Its hard for beginners to learn to code and dig through the journey due to ai advancements
hows it not worth it anymore
ahh cause i typed up a sprinting code the other day and it worked so well
on ai
I mean Ai still cannot create a quality game
true
the point is, if Ai can teach it & explain it, Ai can take it over
hmm
its just not worth it anymore, if we were talking lets say 2 - 3 years ago yeah learn to code (in terms of roblox development)
Coding is just too time consuming, its the hardest development skill to learn but also the most rewarding
its very common to see people with millions & billions of contributions who are not programmers
im doing animating rn
if your making a game hire a scripter
im not
and im poor
cuh
im poor asl
guys so basically i made an queue system the thing is it works only when 1 people is queued if more than 1 people r qued we dont teleport how to fix this issue?
I think you should ask in #code-help providing your code
Blud is waffling.
The ones who have enough experience would
how so?
Their are so many layoffs happening recently due to Ai productivity
if your gonna claim I am "Waffling" specify why
Do you code on Roblox or do you do other stuff
both
You can’t compare Roblox and the real world when it comes to programming
I know game development is the hardest sector to be vulnerable to Ai
Right now Ai can’t replicate what big HIGH quality games are doing
I never said Ai would take over roblox development
For example look at Rell Seas or Arcane Odyssey, do you think an Ai could even sniff at their production? No.
Ai will help junior developers a lot, especially with mathematics
its had a high impact in productivity in roblox development
How so
^
the Ai is just good at mathematical problems
To get the most out of Ai people just need to learn how to prompt it correctly
To know how to prompt it correctly you need to understand code,
yes basics
Not basics, if Ai writes code, and you don’t understand it how do you expect to implement it and work
Ai should just be a “I can do this but I cba to type” then you actually see if they’ve done it
Ai is bad for debugging errors rn
But yh, if your ever scared of this, make your own game so you don’t have to work for a shit employer
im sure everyone aspires this
Do you mind giving me some pointers / feedback on my game
Does any of you here is a cs major?
yeah send it in dms I'll review it soon I just got an interview rn
i ned help when it comes to programming
I'm just a junior cs student lowk gonna drop it and join the swat team LMAO
Dont study CS in college, do something else and just do this as a hobby
its easy I am just prudent
is this satire or ur going to actually shift majors?
care to explain? I don't have any interest in college rather than programming
Guys help me, how can i get slap hand to knockback ppl
I already have the tool but dont know what script i gotta write
Companies DONT CARE about you, if they can replace you with a machine they will, as it’s more cost efficient. Pick another major and do this as a hobby, simple
Well I listened to a lot of senior level programmers, they said that AI isn't that good
but I guess it's advancing everyday
I might just waste money ngl if I'm going to take cs
me when my career path is influenced by some roblox nerd kid
Why do people without Dads not know how to behave
its not satire
@jagged glacier the best advice is right here ^
damn, even though I'll have the best internern ships and win hackathons? 🥀❤️🙏😥
Doesn’t mean anything
My major is nothing to do with CS. I dev on Roblox and do freelance programming work for startups
Mean
damn lol
Cs sucks