#code-discussion
1 messages · Page 259 of 1
But, how do I handle the same logic for client replication without tweens? Do I have to replicate server code to client so I can have two moving shapecasts?
Twins aren't needed for this. Complete synchronization of the logic is required. Basically, the client needs to run the exact same cycle that's running on the server.
You mean like
~Server do Logic of fireball movement~
Task.spawn( Do both at the same time)
FireAllCleints(Params such as start pos, direction, size, effect type,...)
?
Almost. But if you use FireAllClients, the client will start the projectile's movement the moment it receives the packet. While the packet travels to the player (which takes 50 ms), the server's hitbox will move far away, and the player will die from nothing.
How am I able to sync client-server then?
ServerTimestamp
Okay so
Generate timestamp in time now + X seconds (seconds used to cast animation before firing)
~Fire Server function and Client
While timestamp ~= target timestamp
wait
end
Would this work?
Might seem stupid, but this is my almost first time in 3D programming 😄
This isn't stupid. But doing it through loops is a nightmare. Your script might run later than needed. Plus, this won't solve network latency... the implementation should be done using an offset.

Okay, would you mind explaining me how to do it using "offset" without loops ? 😅
I understand everything and how to do it, except for perfect syncing. Which is great
In 3D programming and networking, we treat time as a coordinate. Offset means you don't wait for something to happen; instead, you calculate how much time has passed since the start and where the object should be right now.
Basically, the server sends a packet, and the client receives it at a specific timestamp. The client doesn't start moving from zero; it immediately calculates the position and renders the projectile already at that point. Use Heartbeat, not while wait. Forget about while and wait entirely.
Do I have to write another essay?
Omg
Damn 😄 Thanks for the clarification
Yeah I understand this, I will try to implement something like that for my system. Thank you
my spelling demo died at the end 
lol
I wonder how many games implement stuff like that, since most of spell based games seems laggy as hell
yeah finding a fast way of checking for words is hard but i feel like my method is fast while also being memory efficient
I was talking about spell stuff we talked above 😄
yeah i know its against TOS. its not public
i know
By the way, a question: how do you increase your rank? Lol. For some reason, I'm stuck at a low rank.
Talk a lot
I have one bronze account, but I forgot the password. I chatted on it an incredible amount, like for a whole week. Despite that, I remained at the bronze level.
I think that there is some cooldown before you gain XP for ranks
use Workspace:GetServerTimeNow() or a server timestamp system
workspace get server time now can be a bit inaccurate so it isnt good for frame-by-frame but its good enough to shoot a fireball
I will see what I can create with my current knowledge 😄
Ah i wanted to talk about it
extrapolated velocity though is usually enough for roblox
cframe + velocity * difftime
I understand the theory of this. Will see what I can do when I get home.
What I really love is that with this I can easily stop fireball when it hits anything
id just shoot a fireball and give network ownership to the client
if it hits anything id just magnitude check if anyone was close enough reasonablyt and that it went a straight line
This function is what I plan when I will create explosion type spells. Just effect and distance check during the effect. 😄
I will try to implement the spherecast for spells like fireball or explosion onhit stuff. If I fail I get back to tweens 😄
Might be time to make a proper reactive hitbox module
or yk use the physics engine
Im too slow, never really used 3D as SW developer 😄
tweens are not the same as spherecast
one is a detection method the other moves the blocks
two different solutions to two different problems
not mutually exclusive
i wouldnt tween though
if you do, you gotta object pool or use TweenService:GetValue() in a collected loop
for like intensive tweens at least, otherwise its whatever, just ur missing out on physics interaction and some hit detection issues with collision
I will see what Gemini suggest me how to create spherecast for spells I need, will try docs 😄
I do not want to spend weeks learning this just for simple magic playground for myself and my friends 😄
use the spatial queries under workspace
thats it
:GetPartBoundsInBox
or in ur case
workspace:GetPartBoundsInRadius(pos, radius, params)
For moving fireball?
u can use that yeah, the center of the fireball is the position
radius is the size
its a ball
then params would just be a list of player characters so you only grab players
id physically shoot it personally with physics
I was suggested that spherecast is better than creating physical part as hitbox.
people are full of shit
My goal is to fire sphere ball, that stops when hits first object (player,map) and damages the player if hit.
granted, it depends on the application but if its a moving fireball, spherecast doesnt make sense to use it
thats more of a shotgun
yeah just spawn a fireball on each client with starttime (server), velocity and position/direction (cframe)
launch that mfer with physics
let the client who owns it do it or let the server do it
Right now I use server for hitbox and fireallclients for effects
or if u wanna get more technical, let each client do it based on updated values and have them linearly interpolate but thats beyond ur budget it seems for learning
So just velocity, move forward untill range, hearbeat loop and stops on first detected object?
not to be snarky either
yeah do that, for a cheapo roblox game with ur friends thats fine
id again not use tween id just use physics
Are there no better documentation for ik
No ur fucking cooked
Deadass
Its a "hop in and try the water" kind of Instance
yeah but the water is fucking pitch black
Damn thank you 😄 Sounds way easier than raycasting my complex spells 😄
Come on in its radioactive and makes us feel fuzzy
ya np
the tldr is like
its physically simualted so cosntraints on the attachments work
thats the big detail
if ur talking about the IKControl instance
LookAt works the best highkey, or Transform
Rotation I havent gotten to work at all
if u dont mean ikcontrol the big idea of procedural animation is just literally
each joint is a point
and they have to stay a consistent distance away from each other
with one point being the "lead"
so like if u think of ur hand, ur elbow must remain a set distance away, so it bends to do that
the computer is just figuring out whats the shortest location it can do
based on where it is and where it should be
once u know that its p much straight forward to do procedural anim stuff
So it's just maths I was assuming I needed to use the IK controls
Alr should be easier then
can someone play my scratch games
https://scratch.mit.edu/projects/1249500164/
https://scratch.mit.edu/projects/1246703407/
Hey, running into some issues with discord.js / noblox.js. I'm trying to change the price of a t-shirt using this (image), but for some reason it wont work, here is my script:
Could someone take a look and help please
?
Uh
Why not change it in monetisation tab
What’s wrong with it?
The problem is that noblox.configureItem() doesn't work for clothing items

let me provide script just changed the variable
@cyan palm
Hey guys, I m newbie learning how to make reusable systems instead of simply hard coding everything, I made a little OOP based EffectService, it Emits, Plays, Stops, and Deletes itself, theres support for light, beams, trails, and particle emitters. I will make the same system using DOP (normal coding), but before I do that I wanted your expertise on what u would do and change, primarily about the attachment and surface placement.
Here's the Git: https://gist.github.com/Vandrgard/e7995ed1a62c914cbad90b483507699e
btw, Finally lvl 5 lets gooooo
How should i organise my projects? Its like a roadblock i cannot get past
never work outside in always inside out
start with 1 script and just keep expanding and refactoring
the organization comes over time and you can always change it up later as long as there are no hidden dependencies
Something just clicked in my head with this statement. More helpful that any devforum post
Thanks
holy shit not roblox related but im trying to do a discord bot and its annoying me
it wont even run or start it
discord is easy bro
Do you know any good discord servers related to bots by chance
transforming any html file to a working exe dm me
bro js using electron
@frail yarrow
🥀
nah
yah
nativefier
mv index.html index.hta
nah bruv
Nativefier uses electron
but its js easier
snca bro
anyways mb for wasting yall time ig
hi guys anyone interessted to join me making this new game im trying to develop? I kinda dont have any budget for now and will pay if revenue in robux. A scripter/coder would really help me alot now! and yes the game has brainrots in it :3.
Yo guys whats the easiest role u can learn. Like scripting modeling n stuff
it varies for each person, i personally found scripting easiest but most people disagree with that
scripting difficulty is based on what youre doing
you probably just coded some brainrot icl😭
dude why does everyone in this server assume im stupid
because you woudnt say scripting is the easiest💔
it is for me though
let me ask you this again, whats the hardest thing you coded
firstly idk why you're saying "again" since you never asked in the first place, secondly it'd probably be an npc ai i made
👋 Just a reminder to read our rules and use the marketplace to hire!
-# Hiring or looking for work in our channels classifies as misuse and will result in moderation.
it was basically an indirect question
.
this is a statement man
a statement that expected to be proven wrong
well that would've just made me look like even more of an arrogant prick
im not saying im some divine programmer or something im just saying scripting is easier for me
i already said omg can you not read
guys im going crazy, i cant make a dialogue system 😭🙏 what shud i do
i read the first sentence expecting to be talking about the same thing
whats the big deal
maybe read the full sentence next time
learn how to make one
right...
i can give you my module that does it automatically🤑
nah but what did you have the problem in
So u know how in like pokemon ds games u have the little arrow that pushes the text downwards if its too long
yeah?
Yh I can't figure out how to make it
oh
And Im losing my mind over it
just to make sure, is it the thing that made u skip the text right? i never played pokemon just saw videos
of it
its like if the text's too long
is there any way to make the moon ingame beat like a heart
then the whole block gets pushed down
oh wait
nvm I think I came up with a genius strategy
Im gonna use scales instead of Offsets
bro was using offsets
ts gonna be so fire 🔥
istg everytime i use offset i know i will crash out
i had to make an inventory system with offset
holy stress, had to literally make the resizing system too
offsets are legit js pain
and i didnt use them till now
scales might have been easier atp😭
it isnt hard to convert pixels to scale
anyway i think i got it figured out
thx u 2
it is 100% easy to learn the basics literally just pick up a book on the language then go through the book page by page. Try it yourself then get another book which is the next step up then read that and so on
people who disagree may have a more creative than a logical brain so it's 10x more difficult. People who are good at STEM subjects will be able to pick up coding easier than people who struggle at STEM
Thank you finally someone actually uses their brain
Im autistic so i find things like stem a lot easier than artistic stuff
I cant draw or 3d model to save my life even after years of trying
we all moving to fennel 2026
(:Connect
(. game (GetService "UserInputService") InputBegan)
(fn [input gpe]
;; body
))
Dude wtf is this
Detonation of a ballistic missile
holy shit I've just been adding enums for like twenty minutes
free me
hate this stupidass bot
debounce?
guys quick question if i have 5k robux will i be able to convert it to real money?
from what i know ni
no
fun fact: from what i know, you can do this in module scripts (to know if its server or client)
RunService:IsServer() and (CODE IF ITS SERVER) or (CODE IF ITS THE CLIENT)
i only use this for like printing, for example
local Prefix = RunService:IsServer() and "[S]" or "[C]"
function Warn(...)
warn(`{Prefix} {...}`)
end
does anyone here use lemonade for scripting?
i use potato
Studio output mostly shows whether the msg came from server or client, and in live servers they are in their own log section
how do u prompt a user to enable notificaiton for the game
Math.promptusertoenablenotificationsforthegame(gameid)
With camel case
And uncapitalized math
is there any scripter
ts not line 41
i deleted some lines
so its more clear
but that's where it's throwing the error
overwriting the variable somewhere
Anyone know any good tutorials for scripting?
hes only bool
fellas, how are you guys qualifying your module scripts?
Are you just directly going like
require(game.ReplicatedStorage.Scripts.Fighting.Damage.DamageCalculator)
hundreds of times throughout your codebase
or are you using some trick/strategy/module to handle this?
I wrote some hacky module that builds an in-memory map of module names to their instances so you can just
scriptCollection.findModuleScript("DamageCalculator")
but then intellisense breaks since the caller can only know that its a module script rather than a DamageCalculator 
how quirky what is this?
Maybe using require by string to shorten the length of the requires
me personally i just call the folders and services
i find making a module for modules kinda funny
bro you're gonna LOVE java then
sigh
but yeah i'ts just if you're silly billy like me and accidentally write god classes you will end up with 50 bomboclaat lines of require()s
i make small games so i do not need one :)
i see why you would though
also how does it work??
i didnt know you could require a module from a module
I was gonna straight up send you my registry script but apparently I can't do that here
anyway yeah you just require a module from a module
thats useful yet useless to know at the same time
the key lore here is that when you first require a module it builds a singleton instance of that module, and in further requires, gets that singleton as a reference
so the first time you require, it runs the script like it was a local script or whatever, but just has public methods exposed via its table
no its actually really useful to know IMo you should know module lifecycles
Not really all that informed in backend scripting lol
you may be thinking a bit too restrictively about modules until now 🙂 they are very powerful
IMO the ideal game has 1 local script for client shenanigans, 1 server script for the server, and then a ton of orchestrated modules for everything else
but i have OOP brain rot so do with that what you will
based
I use modules for everything but imo id say being able to require a module from a module is a pretty niche? scenario u would need (well not all that uncommon i can see some)
that's just a way of architecturing
No lol
SSA is not ideal
it leads to better order, but it's not a definitive solution
when you reach to times where you have dynamic objects
created at runtime
such as tools
you'll either break into MSA or suffer under SSA
ah i have summoned the wizards I see, where were y'all when I asked this , lol
what is MSA/SSA? sorry
off chat
MSA = Multi-Script Architecture
SSA = Single-Script Architecture
oh yeah makes sense
although SSA can mean other things on other contexts, just serves this one
for the requires
U can either use a module loader (dont) or a wrapper to simplify it
on my old framework
I had an entire SSA loader
which grabbed all modules, and placed them under a list
then what you'd do was you had two ways
require directly or use a manager to get by string name
the latter only came to be
... but the latter meant you had no intellisense, right?
because I wanted to be able to move things
yeah thats exactly wher I'm at lol
I always created my type definitions manually, including a type module script
super star amulet from bss🙃
and manually type defining it
Single Static Assignment in lowering AST -> IR or lifting assembly -> IR
cool stuff
allows for dataflow analysis and other junk
regardless I went off
you can choose whatever style you want
just think about what you plan to implement
holy crap he is a wizard
or you'll build a wall that you'll later have to destroy
and it will take you too long to fix it later
Guys how does one achieve this
oh im not here to try and tell you whats right or wrong, i'm just wondering how to deal with this
im not i barely remember what 1+1 is 🧠 trust me bro
showing when player dies?
wdym?
lisan al gaib
i'm an english deadbeat or a spanish deadbeat
any further and it's over 🥀
oh god damet the server rules killed my link
The Ui like the side line is not there
UI gradient transparency modifier
with the intention of a 'global' symbols system
devforum thread strategies-for-indexing-finding-scripts-in-the-game-structure-directory/4329691 if you want the full lore? I made a post about it
you have to either set globals yourself
(just now, in scripting help)
or figure
But how do I target the line
im seeing the post rn
king
that's why we index by parts instead of repeatedly again and again
regardless, it's fair
elim or invite friends
Normally this would be eith | |
Roblox just wasn't designed with 'global symbols' if you will
-
depends on your architecture and what you want to sacrifice
-
fully qualified declarations, I have no reason to move modules around 99% of the time.
-
N/A
UI gradient
Wsit can u make it
Longer
transparency property
So if an see properly
I'm not sure why you wouldn't just
cache the path with the scripts
then after doing so
... require them all in a chain and save them to local variables
without doing the chain repeatedly
Can us end how u transparent it
as in just
local folder = path.to.modules
local a = require(folder.a)
local b = require(folder.b)
U don’t use Figma
huh ..?
Nvm thx I get
It
pretty much what I have and was trying to avoid
I guess its just a fact of life in the 'blox.
Thanks for your time! 🙏
ehh, dw
you can do whatever solution you want
you'll just bear with its shortcomings
just how it is 🥀
I was low key hoping for some smart hack or language usage 
what's the point in that anyway
🥀
bro wanted a
idk looks cool prob
LMFAO THE NDA STICKER
RemovePolymorph() // ez clap
no way bro was really coding in loading screen tips
"mb cant finish the morph system im getting drafted"
😭
Yo do u know how to dm
Ppl that are horsing in the hireable section I don’t know how to
But their DMs are off
Then u dont dm them..?
What is bro on about
"How do i bypass peoples privacy settings" like what
use auto-import
just be doing require('@self/module') or require('./module')
is this real lua syntax? 0.o
require can take a string path, yes
wow neat, thanks!
Still doesn't seem to fix intellisense though, unfortunately
yea
auto-import? by MonzterDev?
guys is this good
GetPlayerService
pro = yes
noob = no
jump = space
walk = wasd
lag = smooth
graphics = very good/best
enemies = ok
hacker = no
yes = e
bugs = no
players = many
lgtm
a feature within luau-lsp
im sure there are studio plugins that do the same thing though
would cloth physics on my meshpart accessories be a scripting thing or a setting thing
For those of you who do server side hitboxes etc but animations on client. Have you tried using tags/attributes as Animation markers for the server to read rather than purely timing things? If so is it more time accurate than waiting or is it not worth going through the trouble
you can use smartbone 2
dont do server sided hitboxes do server sided sanity checks
https://devforum.roblox.com/t/smartbone-2-simulated-physics-and-collision-solution-for-bones/2728928
SmartBone 2 Github Releases With the release of SmartBone 2 a lot of things have changed, not only with features but also the code base and UX, the biggest feature yet is Collisions! SmartBone 2 has full support for collision with colliders on any object with many different shapes. You can find out more info in the documentation Funnily enough...
Well im still going to handle knockback/ damage server side so the timing thing still applies
yes
anything else rqlike a setting change or anything or is JUST starting it all it takes
read the docs
Wtf am i reading
ty
the besh code in the world
how many of yall use opus 4.5
the claude model? i do, its the default claude atm right?
i do
good with math though i wouldnt use it for much else
yes, was just curious what everyones favorite AI is rn. My favorite model that works the best for me isn't capable of having full project scope because it is a custom GPT. Considering trying something else so I can stop wasting time re-explaining shenanigans
ok so you don't use it for day to day or common workflow scripting ?
i do a lot of math so yes id say i use it daily
Paris can we be GitHub mutuals
wdym
Follow each other on the hub
oh sure
fs fs, thanks 👍
Bet follow me back 🥹
is this you https://www.youtube.com/watch?v=zZr54G7ec7A
Following on from the previous video at https://www.youtube.com/watch?v=cyyR7j2ChCI, I now attempt to formalize a different proof of the same assertion using the large language models Claude 3.4 Sonnet and o4-mini-high, after giving them the informal and formal proofs from the previous attempt as reference.
The informal proofs were taken from h...
🥀
I got all my real stuff privately trust
me too
if I make these weapon modules thats in Server Storage access the PlrStateService, is that not good? bc I can only think of them accessing the stun service directly otherwise its not possible

youre really only going to get people who want to build a portfolio to work for free (aka beginner-intermediate). most 'experienced' developers won't work on games when there's only rev share / no gain
that's not to say there's none that will work on a game for just rev share, but the amount is a lot lower than i'm sure you'd like
i just use whatever claude gives me today
It sucks and I’m going to die
I wish I could just use whatever Claude gives me
Its amazing 🤤
I enabled it in beta features a bit ago
they reworked it?
they reworked it?

Hi
You remember me?
Yes
Ayy
Lol bro, we actually in discord group
I don't know, most likely yes. I just couldn't do it right now because I'm not at home.
Ah I quit
Ah
Rpgs take too much time
That true
Ain't nobody got time fo dat
ah
Anyone wanting to create a horror game with me?
Whats idea?
Something like doors, and also like somehting else which I'll tell you in dms and you can't share it to anyone.
Anyone wanna give me 25k USD so I can get a 2014 S197 GT?
No
Alr
Anybody else?
Dm me
@balmy sorrel
If you give me 25k USD I'll think about it
...
😭 lol
ok if you give me 25k I'll just do it
you have my word
25k USD and I'll work on your doors game
K i can give u 25k Rials
Check it.
USD only
looking to create free scripting things for my portifolio. DM me so i can start getting nice portifolios + u get free scripting works. - intermediat scripter
Anyone wanting to create a horror game with me? We need more people to add to the team.
ok soooo when am i hired for every roblox game
If you wanna make a horror game with our team just friend me and welcome, and tysm for joining your the best ever!
Anyone wanting to create a horror game with me? We need more people to add to the team. Were not looking for any coders.
then why are you asking here
looking for full time scripting hirements. Intermediat scripter, looking for payment per task. 500-1k per task.
dm
We need builders, animators, etc.
Anyone wanting to create a horror game with me? We need more people to add to the team. Were not looking for any coders.
then maybe dont fucking ask in the code discussion
How would I make a gifting system for dev products?
Who can help me make a game I don’t have any ideas and can someone help me make the game
Anyone wanting to create a horror game with me? We need more people to add to the team. Were not looking for any coders.
@modest pagoda
Join my team.
you can help me?
I have same question
You'd use MarketplaceService to detect when a dev product is made then show a gui to the user to get which player to target then apply the beneift to that player
However if the game shuts down in the middle of this process or even datastores fail u gotta add a safety net to prevent angry people reporting you
For that safety net I would record in your datastore taht they purchased the dev product and record that the benefit wasnt gifted. Once the benefit is gifted remove the 'not gifted' record from the datastore. If user logs in with a 'not gifted' record in the data store then you already know the gifting process failed last time and then you can retry gifting.
or use MemoryStoreService for the safety net which is even smarter.
My response ^
hmm. could i make a shop so they can buy gifts and then when they purchase it they get in there inventory or something and then i will make a button for sending gift and player will chose player to be gifted and choose what to be gifted
I could have asked this to ai but the ai just agrees to me everytime
This is a good approach cuz u wont need to make that 'safety net' thing, I see nothing wrong with this approach. Just always make sure that the gifting cancels as soon as the target leaves the game, cuz if they leave the game early it might not be a good idea to change their inventory in the data stores (cuz they can log into another server quick and dupe items)
Duping items is the real trick here which u will have to test for heavily
Cuz if they find it ur whole game economy is screwed
Maybe add a gifting cap per minute
I like the blox fruit type thing. you buy a gamepass which is actually a developer product and you store it into your inventory and can trade it
Record which items were gifted so u can delete them if a dupe is found. Record the time which they were gifted so u can have a reasonable way to tell if they used a dupe
Yep its a better way for sure
bro my game ain't that big that someone will dupe items lol
I worked for a roleplay game before with an inv system and let me tell u, dupes and data store crashes are not hard for players to do.
Oh ok sure dont woryr about it then
probs the most annoying thing for you to do then is making the gifting UI TBH
Wait how will i give benifts of gasmepass to gifted player. Cuz in my code if a user have a gamepass in his current inventory.
How do u check for gamepass, with the MarketPlace:HasGamePassid() thingy?
yes
also gamepasses are not dev products in terms of coding, so be careful
dev products dont have a :HasDevProductId() method
if MarketplaceService:UserOwnsGamePassAsync(player.UserId, PASS_ID) then
You could have an array in the data store called "PassesUnlocked" that has the id of each game pass AND/OR dev product
careful cuz if they get gifted it, you have to stop them from buying the gamepass again
cuz otherwise ulll get spam messaged for refunds
people will inevitably misclick/forget
Bro I think I would have to burn my all codes and rewite it 😢
Yeahhhhhh probably, thats coding alright xD
I think I should make gamepass also dev product
I will store if the user has bought it
you should make it either game pass or dev, not both
dev is better i think cuz u can buy multple times and is suitable for gifting
yep i would choose dev
I spent a full night to make the shop code. and now i am back to square 1
i mean not full night 2 hours maybe
With dev products u need to implement a callback called ProcessReceipt, cuz this call back will be spammed for the same DEV product id (on purchase) until the callback returns 'yep, it processed'
If ye need help bug fixes I can always help
I've done this all before
wait if you have done this before can i cann get a head start by getting some code for free 👉 👈
Also roblox expects you to store their UserId in the datastore as metadata, I think SetAsync has a way to set their user id associated with the record that they purchased the dev product
sure
except u cant just use it cuz its not custom to urs
i just need to see code i can customize it. I just need the logic
Yeah ill probs just post it here
alright thank you
Thx
DevProducts.server.lua
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local MarketplaceService = game:GetService("MarketplaceService")
local PurchaseService = require(game:GetService("ServerStorage").Services.PurchaseService)
local ProductsConfig = require(game:GetService("ReplicatedStorage").Data.ProductsConfig)
local DataService = require(game:GetService("ServerStorage").Services.DataService)
local InvTypes = require(ReplicatedStorage.Data.InvTypes)
local function registerFragPurchase(idx, data)
PurchaseService.RegisterDevProduct('FragmentPurchase', idx, data, function(plr : Player)
local profile = DataService.GetProfile(plr)
if not profile or not profile:IsActive() then
error()
end
profile.Data.Currencies.Fragment += data.Amount
print(`Granted {plr.Name} {data.Amount} fragments!`)
print("Product Details:", data)
end)
end
for idx, data in ProductsConfig.DevProducts.FragmentPurchase do
registerFragPurchase(idx, data)
end
MarketplaceService.ProcessReceipt = PurchaseService.OnProcessReceipt
local currencyToProducts = {
Fragment = "FragmentPurchase"
}
ReplicatedStorage.Remote.Shop.BuyCurrency.OnServerEvent:Connect(function(plr: Player, currency : InvTypes.Currency, optionIdx : number, productDetailsToConfirm : {}?)
local cat = currencyToProducts[currency]
assert(cat)
if productDetailsToConfirm then
if not PurchaseService.ConfirmDevProductDetails(cat, optionIdx, productDetailsToConfirm) then
return
end
end
PurchaseService.BuyDevProduct(plr, cat, optionIdx)
end)
This will probs confuse you more cuz it's custom code for a game I made
I never added trading cuz I had no need for it
Trading is like u said just a simple item transfer or soemthing,
ok lemme see the codes
I posted two scripts
one is a module (PurchaseService)
DevProducts is the normal script
Need both for it to work
DataService is really just ProfileStore
Oh yeah i just realized the code for the dev products is not there
Oh wait it is
in DevProduct script
@weary socket Btw is making your own ingame curruncy good? Like I make lets say Gems my premium currency so player can buy gems with robux and everything is able to be bought by Gems. So I don't have to code so much. Is there any flaw in this idea?
Maybe if people can somehow duplicate currency, but if you got good code, then nope! it's fine, lots of games do it, including mine (I just call it Fragments in the script)
Its actually smarter cuz u can make people buy bundles of higher currency to make more robux
so they kind always overpay a bit in theory
cuz they will usually have left over currency
And I would make it so the amount they can buy is either a bit small or a bit high to what they want to purchase. So they have to buy higher and i will make money from the kids hahaha
bro u read my mind?

Ok i am disabling my scripts so i can work on my new code byee. thx for the help @weary socket
Good luck!!
Refer to the offical roblox documentation tho, it's a life saver
Anyone wanting to create a horror game with me? We need more people to add to the team. Were not looking for any coders.
Anyone wanting to create a horror game with me? We need more people to add to the team. Were not looking for any coders.
can anyone please give me some tips about scripting?
i wanna learn efficiently along the way
i just don't know where to start
Don’t learn it it’s not worth it
i'm asking for help not discouragement

just open studio and make stuff
like the best way to learn is to do
remake a mechanic from one of your favorite games for example
but then how would i know if it is efficient or not just by doing anything i can think of?
isn't going straight for complexity a bad idea?
saying that there is a efficient way of learning is saying that everyone learns the same, which isn't true
start out with simple stuff and just set a goal for something harder
not always, i learnt most from doing complex stuff
efficiency and uniformity are both different things, you're confusing it with that
yeah but not everyone learns the same
yeah i know, you just have to find your own way and expand from there
could go back to basics, pen and paper
a good video that has a bunch of lua and roblox luau would be
https:// www.youtube.com/watch?v=mZMuWkc0cYg
(remove the space since i cant post links yet)
thanks
this video explores variables, functions, and provided luau objects
even tables, events, etc
i got it, thank u
hvb
Anyone wanting to create a horror game with me? We need more people to add to the team. Were not looking for any coders.
Oh ok ty
asks in #code-discussion
making a giant public math library... wish me luck...
i finished the pathfinding module
Do you opensource it?
save everyone 2 characters and call it EzMath
what sort of things are you planning to put in the maths module?
guys how to send image in this group ?
what does session locking mean?
i will open source it !
our full plan is to make it a math library used for all types of games and genres
right now we are working for pathfinding
goodluck, would be cool to also extend this to other features people tend to implement in games
from a simple npc moving back and forth to a full on supporting horror games or npc companions
we are making sure the pathfinding will work for all types of games
then we will move on to tweens or curves
hi guys
u can use it in animating a block or the curvature of a arrow shot
hru
i am good
good
we cooking 
im trying to optimise my game for console and for some reason when i press the share button (small left button opposite settings) on a ps5 controller, the virtual cursor automatically selects a button and when i try to move it, it just goes to the next button instead of letting me move the cursor freely on the controller, how do i make it so i can move it freely?
roblox itself is not optimized on controler, they dont get to really have a free cursor
i just had to enable the virtualcursormode in startergui
tf lol
what are you trying to do
can any1 help test my game
how do I make my own roblox character models for my game and make it the characters that players join as?
Rename the roblox starter character models as StarterCharacter into StarterPlayer service
if all the scripts and objects inside the custom character models are alright then it should work
alright thanks, do you have a certain video on it or should I just search one up?
Now, this thread was made quite some years ago - regardless… If we look at this page http://wiki.roblox.com/index.php?title=API:Class/StarterPlayer We can see that it is now as simple as adding a Model named StarterCharacter into the StarterPlayer service, after which the default character loading is disabled, and your overridden character s...
alright thanks
it will be coming i estimate in like 2026-2028 but right now you have no choice but to delete the data from the animation and animate the root motion in your script
and yes it is really tedious especially when not all torso translation is actually root motion
Sigh
Useless updates lately but no good ones like these
cause roblox devs arent that interested
if roblox actually removes R6 im quitting
they have been pushing stuff like new char controller, curve animations, animationconstraint, new animator methods, animation parameters, ... and people just arent using it and have no idea they exist or how to use it
Would be easier to get cutscenes done with it
Anyone trying to sell robux for higher value dm me
i swear its like roblox is killing its own identity, do they really think we want those uncanny realistic avatars 😭
i dont see them removing r6
cause like there are games that depend on it
that would break soo many games
removing classic faces on the other hand, is easier for them, since not a lot of games depend on classic face being present in avatars
There is a way to move the cursor via controller with roblox input APIs
So essentially mouse, but its bound to your right joystick and the A button.
Virtual Cursor Update: APIs! Do you have a complex, mouse-driven UI in your game, that doesn’t work as well on a gamepad? Our solution, the Gamepad Virtual Cursor, just got even better! We’re excited to bring you the next major update for Virtual Cursor: APIs! Through the API, developers are given additional options to set the state of th...
yo can anyone help me price a system rq
devs and community would be so mad day 1 they would change it back
Rate this script my friend made
bridgePart.Transparency = 0.5
bridgePart.Anchored = true
bridgePart.CanCollide = false
local buttonPart = game.Workspace:WaitForChild("ButtonPart")
local isTouched = false
buttonPart.BrickColor = BrickColor.new("Really red")
buttonPart.Anchored = true
local function buttonTouched(partTouched)
local humanoid = partTouched.Parent:FindFirstChildWhichIsA("Humanoid")
if not isTouched and humanoid then
isTouched = true
bridgePart.Transparency = 1
bridgePart.CanCollide = true
task.wait(2.5)
bridgePart.Transparency = 0.5
bridgePart.CanCollide = false
isTouched = false
end
end
buttonPart.Touched:Connect(buttonTouched)```
He started a day ago
congrats
Gj bro
i sent over like 300 lines of perfect anticheat and got declined
Lets say I make a code the codes parent is called Button so it would be:
local Button = script.Parent
And I want another thing called Button can I call the same since the script is inside it’s own Button?
Or do Increase with 1 each time like
Button1
Button2
Button3
Im genuinely curious
I started scripting yesterday
the variable will be changed if you do button continually
Ah so the code won’t know which Button unless the variable is changed
guys i just finished brawldevs basic tutorial on scripting , everyoen is telling me to instead of watching his advanced one to just make stuff , what do you guys suggest me to make
I started yesterday I’ve already learned 5-10 lines of code I would advise you to try ur self
You can watch but watching won’t make it stick in ur head
Try doing something out of what you learned so far
W
i tried applying each thing to a script of mine and did my own thing
but im kinda confused where to go from here
Same man rn I’m tryna watch another tutorial so I’m 100% sure
is chatgpt good? ive been using brawldev
Is brawldev an ai?
his tuts are realy good but also super duper simple
nah hes a youtuber lol
Is it on YouTube
yeah
he has 2 a basic and advanced
he explains very well but if u know the basics the first few videos would feel like a waste of time
but i suggest watching em anyway
Yooo they are short aswell
yeah theyre spaced out between 18 vids tho
is it my studio stupid or smth why is the module scripts putting syntax when u require another module script i mean it works fine but its stupid
That’s rlly good
can someone take a look on #code-help
yeah
if u used gpt to help u and didnt understand suggest u watch him
Hey chat, I just have a question for anyone here. I recently finished learning how to script and I dont really know what to do next, Im not ready to make my own game because Im the most uncreative person ever so I rlly want to do commissions, but because I only know how to code, how would you guys recommend making a scripting portfolio? Would I just show off random stuff I script?
recreate systems from popular games
for example i made a deepwoken inspired combat system with features from like for honor and made some money off of that
or you can contribute to some opensource stuff on github
Thats not a bad idea 😮
yeahhh'
Should I maybe make a game where I put all my scripting stuff and have it all in one place?
but also experiment yk? like make a game where you are using primarily meleehitboxes with spatial querys but then also make a game primarily based around moving hitboxes and experiment with raycasting
yes
this will also help u with organization
like do you know how to organize your code
module loaders? yk
Eh... Im still pretty basic when it comes to that part of it all
its a big plus if you can make a really good combat system, but make it really easily customizable using module loaders
well thats the fun
experience makes you better
also module loaders make it so that if you want to make a game in the future you can easily recycle it

Thx! 😄 👍
is DataDelve safe
do u use ProfileStore and DataDelve? DataDelve to see and delte corrupted data and profilestore to save?
i use datadelve more to edit data for testing purposes, but yes
my data doesnt often get corrupted
im lost on the profiles. Do i use profiles as a newDataStore or is it all the dataStores in the game?
profilestore has its own datastore it uses to store data
i forget what its called
but it can be edited in datadelve
Could anyone explain this in their terms : MasterSword.__index = MasterSword
Set's the table's index key to the same table. Purpose: It can be used as a metatable, most commonly used to extract functions from the table and allow it to be used on any table that uses it as a metatable
Ok so i have to use it with lets say setmetatable (basicSword , MasterSword)
It explains to the Lua interpretor that key value pairs that are not in the original table can be looked for in the MasterSword table
ok so it eliminates the chances to get nil
if u dont have a object in ur table
i ll try to practice it thanks
not 100%. MasterSword may not have every key that will be indexed, ie basicSword[someKeyhere]
basicSword[someKeyhere] can still return nil
theres a way to explain thats really good hold up ill try
oh i get it , but it helps since it looks into MasterSword just incase that exist
i m 30 minutes in trying to learn OOP so its gonna be a challenge lol
why is it so hard to apply what I've learned when trying to make a game
local basicSword = {}
local MasterSword = { lol = "XD" }
MasterSword.__index = MasterSword
setmetatable(basicSword, MasterSword)
local someKey = "lol"
basicSword[someKey] -- gives XD
--because: basicSword[someKey] is the same as the following:
local value = basicSword[someKey]
if not value then
value = getmetatable(basicSword).__index[someKey]
end
Look at the last 3 lines of code
There u go
exactly what happens
thanks a ton
this a me-problem?
__index is extracted from the metatable and used to index essentially 🙂
except __index can be a function, and in that case, __index(mytable, mykey) would be called
i see and that avoids having to rewrite 1000 lines of code for every new thing i add i just check the master sword for the same key
very efficient thanks
metatables just add extra instructions, and if u can visualize those instructions, its the easiest thing ever
was this scripted?
i don't understand __index in terms of OOP
its the closest thing to "OOP". Also, Lua OOP can never be the same as Java OOP or C++ OOP, Lua is limited
in a sense
is that what u meant
or you mean how does __index even mimick OOP?
ye
isnt that ur own project that you are making?
uhhhhhhh no
Maybe its urs
yes
local MasterSword = { }
MasterSword.__index = MasterSword
function MasterSword.Slash(self)
print("Slash")
end
local mySword = {}
setmetatable(mySword, MasterSword)
mySword:Slash() --prints slash even tho Slash isnt defined in mySword table
i seen u asking questions about it before...
asking questions about what
theres NO way bruh how do they do that?!?!!
the glare on on the SurfaceUI buttons
it's pretty simple tweening
Oh you share a username with some other Natheus guy. My bad.
like would I need to include an entire content directory too
Damn, what a coincidence
Why are you so defensive?
thank god we’re not the same person
what do you mean by content directory?
is that inheritance 🤷♂️
Ah, I see. That explains.
yeah
ask the next guy
ok whoever writes next gotta answer
I mean it likely clones a map locally somewhre and sets your position there
alright bud your time is up
camera wise
anwser me and @opal pecan now
The white flash gives it away
yeah should be right
The other possibility is the whole map is placed in a viewport frame that covers the screen, but viewport frames dont render sky so idk why it would be that, they would need a workaround
nah that would be too complex for something so simple. And I dont think screen guis work inside of viewports
What are we figuring out guys
yeah its overkill so it shuldnt be that, ur right. just a locally cloned map
oh surface gui in a viewport, trtue
1 hour of coding a reusable plug and play modular system or 15 hours of tweening camera cframe
u right
which one scripter boy?
0-0
u replied to urself
u should whip this one next ._.
Plenty of times matter a fact
Bro I am not sure if you're here to ask Roblox related questions or stir up emotions
how do u guys learn to implement math into ur code to make better movement or maybe add swinging in ur game, I honestly don’t get it
Take a math class
Take a lua class
Implement learning
teacher sucks unfortunately
Udemy
Linear algebra and vector math is probably the most helpful
8 thousand lines 
wip 
is 60k enough for a realisitic bike driving system thats physics heavy
60k lines? that seems like it uses alot of redundant code
oh nwm you mean robux
i meant robux lol
yeah i would say 60k is resonable if its proformance friendly, expandible and well put together
but its a hard maybe since i dont know how good it is
Could anyone give me Robux to advertise my game or give me tips of how to without Robux please and thank you
hopefully i never have to touch this combat system again holy shit
anyone made first person?
Just a question (if it’s even possible to do efficiently) can there be a system where you can take a photo of your avatar in game WITH the surrounding maps, and be able to save that photo in game so you can look at it and keep a collection of photos?
In other words, collecting photos of yourself in game and keeping them to look at
interface system?
Why are we in VS
you can use the captureservice i think
or if you want to do it manually then put the whole world in a viewportframe and position your character and camera..not very optimized tho
i like how the NPC neck and only the neck moves
i would not make an 8 thousand line list in luau
how do u track when it’s cautious?
oh is it when they touch the yellow lines
chat should i feel guilty for copying the toolbox scripts?
wym copying
toolbox scripts suck u shouldn’t
i want to copy this
but i dont wanna feel guilty
like practically steal it
thanks my consicious is clean 😭
it’s better to just use documentation to work on ur problem solving from my experience
thanks🙏🏾
when a player equips a tool
oh im stupid then
unironically using 'maxxing' will always be funny to me
this is somebody else's work NOT mine. im a beginner scripter and i would like to know if this is complicated or how long it would take to learn just out of curiousity because idk at all what they're saying lol. i don't have image perms so this is the code from the image:
updateTools()
trove:Add(playerData:GetKeyChangedSignal("EquippedTool" .. 1))
trove:Add(playerData:GetKeyChangedSignal("EquippedTool" .. 2))
trove:Add(ReplicatedStorage.GameConfiguration:GetAttrubuteChangedSignal [IMAGE CUTS OFF]
once again this is NOT my work
hey is that your work
yeah
whyd you write this bro
because no image perms
not what i meant smh my head
because im just curious
i really dont know much about scripting
other than what a variable is 😭
wouldnt worry too much about that for now, focus on the basics
that uses mostly third party modules
you can find the documentation for them easily
but a lot of it will be explained the more you learn the fundamentals
ok thanks
e.g. Trove: https://sleitnick.github.io/RbxUtil/api/Trove/
A Trove is helpful for tracking any sort of object during
runtime that needs to get cleaned up at some point.
just from that small snippet its hard to tell exactly what its meant to be doing
top function is a custom function, bottom one is cut off
yeah someone called him a genius so i was just curious if it was brilliant or the other guy is just beginner lol
✌️
I mean u could turn it onto a single line or just check if the dir value is pos/negative and return the same state for offset if it is constantly 6/-6
I wouldn't put that in a single line with ifs or ands for assignment
unless you want to make your code less readable
if math.abs(Direction) >= 0.5 then
Offset = math.sign(Direction) * 6
end;
ye what I was boutta say frl
local cam = game.Workspace.CurrentCamera
local plr = game.Players.LocalPlayer
local character = plr.Character or plr.CharacterAdded:Wait()
local humanoid = character:FindFirstChildOfClass("Humanoid")
local connection = nil
local ServiceRun = game:GetService("RunService")
local function CameraBop()
local Y = math.sin(tick() * 20) * 5
local base = cam.CFrame
cam.CFrame = base * CFrame.new(0,Y,0)
print("working")
end
humanoid.Running:Connect(function(speed)
if speed > 0 then
if connection then return end
connection = ServiceRun.RenderStepped:Connect(function()
local Y = math.sin(tick() * 7) * 0.2
local base = cam.CFrame
cam.CFrame = base * CFrame.new(0,Y,0)
print("working")
end)
else
if connection then
connection:Disconnect()
connection = nil
end
end
end)
``` is there a smoother method for camera bopping? ts is so ass bro 😭 the camera moves up automatically in a weird way and goes back to the middle position immediately when connection is disconnected
seems to only look good in first person
spring math
ask chatgpt, deadass
or claude
just go "how do i turn this into spring math and what is springs in interpolation methods"
the tldr is it interpolates but uses the current state's momentum to simulate a more realistic physical reaction, like dampening
also i wouldnt do ur code like this, id do both x and y, and i wouldnt tie the connection inside an event
i wouldnt be learning much if i did 💔
ill check it out though
wdym
everytime i use chatgpt it just feels like cheating, i prefer to try and problem solve without it
using AI to come up with ideas and solve them atrophies your brain (literally, studies show it)
using AI to help you understand something has been shown to increase brain activity than if you were not using it
so just ask it "do not code it for me, tell me about spring math and force me to work through it":
ohh alright i understand
be aware of it writing some nonsense
that too
turn on search feature
I sometimes forget how to take a derivative
Physic developers
i can help
I think this works
looks gay
thank you fellow
conclusion :
- make game like knockout but it does have more minigames such as goat rage, invisible, slippery floor, random power, etc
- make saveprofile for each player
- inventory for skin/item
- shop for buying item/skin
200$ for this is good price?
Use it to understand
Even just copying it will let your brain recognize patterns letting you understand better next time you have a similar problem
who can build a bot for me ill pay well
how to make two proximitys appear at thte same time
double ternary on a line is nightmare fuel but it's probably one of the less shit options
Lowkey is recreating gang beasts possible
im pretty sure theres already a game like that on roblox
depeds on what "direction" and offset is but u could do
offset = (direction >= 0.5 and 6) or (direction <= 0.5 and -6)
you dont need a if-statment?
not really
interesting
the first () says if direction is >= 0.5 then offset is 6, if it isnt then offset is nil, then theres the or, and if the first value is nil it does the second check
hmm
Are the 13 year olds onto something or just spitting shit?!
yes
spitting shit
Saying shit or spitting shit 🤔
