#code-discussion

1 messages · Page 304 of 1

fading pollen
#

okok

#

but if the code is tested and seems functional in production, I should go for it regardless right?

ancient root
#

It won't break your game

#

Even if

fading pollen
#

okay! appreciate the tips a lot thank you :)

ancient root
#

When I used --!native it cut the time of math.sqrt / n^0.5 operations in half

#

I haven't seen any performance gain from --!optimise

#

It just makes debugging harder

fading pollen
wooden harbor
fading pollen
#

hows it glaze he prolly tested it ig

ancient root
#

I benchmarked it

#

with 10,000,000 iterations

#

weird thing is that math.sqrt and n^0.5 got the exact same time almost every time

fading pollen
#

iirc i found out during my tests that math.pow is unbelievably slow compared do doing n^2

#

idk why

ancient root
#

you can heavily speed up n^2 if you wrap it in a function

#

so it'll be even faster

trim mango
#

n^0.5 does too

balmy sorrel
#

who cares about time complexity

fading pollen
balmy sorrel
#

just add a ton of for loops and forget about it

ancient root
#

local function pow(n) return n^2 end

icy bone
#

real chads have O(n!)

fading pollen
ancient root
#

It didn't in my benchmark

#

it boosted the times

balmy sorrel
icy bone
#

my favourite time complexity

#

its o(nlogn)

#

cuz it sounds nice

dark juniper
#

🙏🙏🙏

icy bone
#

Albert einstein

balmy sorrel
#

Albert and Einstien

dark juniper
#

And bro dedicated his life to it too

ancient root
#

math.pow is so fucking slow

dark juniper
#

bro set the goal when he was 12 got it done after the phd

ancient root
#

Wrapping it in a function is much faster

#

fractionally but still faster

icy bone
#

0.001 seconds faster

#

This is

#

Time we need

#

These are the issues

fading pollen
#

holdon

ancient root
#

n*n wrapped in a function is fastest

fading pollen
#

" 00:54:27.330 Without function : 23.313100000450504 - Serveur - Script:5
00:54:27.353 With function :23.56809999946563 - Serveur - Script:15"

ancient root
#

Here's with --!native

n^2 beats n*n in native

fading pollen
#

with function is slower lmao

ancient root
#

Try this

#
local mathpow = math.pow
local function pow(n: number): number return n^2 end
local function pow2(n: number): number return n*n end

local iters = 10_000_000

local sink1 = 0
local sink2 = 0
local sink3 = 0
local sink4 = 0
local sink5 = 0

local start1 = os.clock()

for i=1, iters do 
    sink1 += mathpow(i, 2)
end

local end1 = os.clock()

local start2 = os.clock()

for i=1, iters do 
    sink2 += pow(i)
end

local end2 = os.clock()

local start3 = os.clock()

for i=1, iters do
    sink3 += i^2
end

local end3 = os.clock()

local start4 = os.clock()

for i=1, iters do
    sink4 += pow2(i)
end

local end4 = os.clock()

local start5 = os.clock()

for i=1, iters do
    sink5 += i*i
end

local end5 = os.clock()

print("math.pow: " .. end1 - start1)
print("n^2 (function): " .. end2 - start2)
print("n^2 (plain): " .. end3 - start3)
print("n*n (function): " .. end4 - start4)
print("n*n (plain): " .. end5 - start5)
fading pollen
# ancient root n*n is faster than all

thats because a multiplication is faster than n^2 but that only applies to powers of 2, obv if u need huge powers ur not gonna do n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n*n

fading pollen
#

i js do local a = 2^2 lmao

#
local function Square()
    return 2^2
end

local Clock = os.clock()
for i = 1,10000000 do
    local a = 2^2
end
print("Without function : "..tostring((os.clock()-Clock)*1000))

local Clock = os.clock()
for i = 1,10000000 do
    local a = Square()
end
print("With function :" .. tostring((os.clock()-Clock)*1000))
#

personally i js have that

ancient root
fading pollen
#

holdon let me try with ur specific things

ancient root
#

n^3 still beats

#

math.pow is still fucking slo

fading pollen
#

00:58:24.428 Without function : 30.420799999774317 - Serveur - Script:9
00:58:24.459 With function :30.65449999849079 - Serveur - Script:15

local function Square(i)
    return i^2
end

local Clock = os.clock()
for i = 1,10000000 do
    local a = i^2
end
print("Without function : "..tostring((os.clock()-Clock)*1000))

local Clock = os.clock()
for i = 1,10000000 do
    local a = Square(i)
end
print("With function :" .. tostring((os.clock()-Clock)*1000))
ancient root
#

You're meant to stop the clock before printing

fading pollen
#

overhead still makes the function take longer

fading pollen
#

oh i never thought of that actually

ancient root
#

print literally adds to the benchmark, making it void

fading pollen
#

i forgot print would add some time lmao

#

well the add should be constant given the nature of the print but holdon ur right

ancient root
#

os.clock() also adds some time, if you want most precise, cache os.clock into a local

fading pollen
#

00:59:37.392 Without function : 30.550299999958952 - Serveur - Script:10
00:59:37.423 With function :30.90920000067854 - Serveur - Script:17

local function Square(i)
    return i^2
end

local Clock = os.clock()
for i = 1,10000000 do
    local a = i^2
end
local End = os.clock()
print("Without function : "..tostring(End-Clock)*1000)

local Clock = os.clock()
for i = 1,10000000 do
    local a = Square(i)
end
local End = os.clock()
print("With function :" .. tostring(End-Clock)*1000)
#

still the same idea

fading pollen
#

i get the idea for precision but that's pointless for this test since a benchmark with an accuracy of 1/100s would already be much more than enough

#

also i'm not even sure if it adds some time at all since according to you this is compiled and then interpreted, os.clock must have it's own bytecode and setting a variable to os.clock virtually changes nothing to that

ancient root
#

benchmark os.clock

fading pollen
#

like, if os.clock compiles to 0F FF FF FF idk, doing local Clock = os.clock is still gonna compile to 0F FF FF FF

#

if anything it adds the overhead of a variable but thats not rlly anything crazy

#

wait nvm it does add overhead lmfao

ancient root
#

Doesn't os.clock use windows as a layer to talk to find out how long it has been up?

fading pollen
#

i'm ngl i have absolutely 0 clue about how it works behind the bars

#

i'm sure its a bit more complex than that tho since it also works on phones and such

#

it's probably a more generalistic wrapper

ancient root
#

n^2 (function wrapped) wins majority of the time

#

With native math.pow finally catches up a bit

fading pollen
#

i'm really not sure how come it's winning for you, for me the function is clearly losing and that seems like the logical result

#

send ur code again rq

ancient root
#
local mathpow = math.pow
local function pow(n: number): number return n^2 end
local function pow2(n: number): number return n*n end

local clock = os.clock

local iters = 10_000_000

local start1 = clock()

for i=1, iters do 
    local a = mathpow(i, 2)
end

local end1 = clock()

local start2 = clock()

for i=1, iters do 
    local a = pow(i)
end

local end2 = clock()

local start3 = clock()

for i=1, iters do
    local a = i^2
end

local end3 = clock()

local start4 = clock()

for i=1, iters do
    local a = pow2(i)
end

local end4 = clock()

local start5 = clock()

for i=1, iters do
    local a = i*i
end

local end5 = clock()

print("math.pow: " .. end1 - start1)
print("n^2 (function): " .. end2 - start2)
print("n^2 (plain): " .. end3 - start3)
print("n*n (function): " .. end4 - start4)
print("n*n (plain): " .. end5 - start5)

paste this in the command bar

#

and open the output

fading pollen
#

" 01:04:58.216 n^2 (function): 0.029117499998392304 - Modifier
01:04:58.216 n^2 (plain): 0.029091499998685322 - Modifier"

#

well LMAO

ancient root
#

It might be my specs?

#

PC specific case

fading pollen
#

maybe i'm ngl, that's really weird

#

i get the same results when launching it in a script, function loses by ab it

ancient root
#

Weird

fading pollen
#

WELL wtv, computer science what can I say

#

ima go back to my stuff i need to focus a bit before i go sleep, goodnight brother

ancient root
#

gn

hasty mesa
#

Roblox will inline loca functions

#

meaning
local function x()
print(1)
end
x()

just becomea

print(1)

ancient root
#

only problem is that it requires a variable

#

so it can't do that

hasty mesa
#

the only case is if it's var args

fading pollen
#

inlining is directly giving the assembly to the cpu instead of the function overhead right

hasty mesa
#

is gonna be directly injected to where the function call is

#

instead of a function cl

fading pollen
#

oh right mb i defined it wrongly

#

thats what i meant tho js the binary not the assembly lmao

ancient root
#

It's still faster tho

hasty mesa
#

from the benchmark

fading pollen
#

isnt that unbelievably inefficient tho

#

it inlines all local functions?

hasty mesa
fading pollen
#

or only appropriate oneqs

hasty mesa
#

small ones

ancient root
#

how is it noise

fading pollen
#

oh okay lmfao

hasty mesa
fading pollen
#

holdon i can js

ancient root
#

But it's pretty much always faster

fading pollen
#

01 10 33.141 Time for 1 : 21.297299999787356 - Serveur - Script:7
01 10 33.163 Time for 2 : 21.687100001145154 - Serveur - Script:7
01 10 33.185 Time for 3 : 21.41000000119675 - Serveur - Script:7
01 10 33.205 Time for 4 : 20.56050000101095 - Serveur - Script:7
01 10 33.226 Time for 5 : 20.351300001493655 - Serveur - Script:7

#
for i = 1,5 do
    local Clock = os.clock()
    for i = 1, 10000000 do
        local a = i
    end
    local End = os.clock()
    print("Time for "..tostring(i).." : "..tostring((End-Clock)*1000))
end
#

ok i cant get rid of the stupid 10 but here

hasty mesa
#

they have the same exact instructions

fading pollen
#

wtf you have access to the actual assembly??

hasty mesa
#

thats bytecode

fading pollen
#

isnt bytecode just assembly but unreadable

hasty mesa
#

no

fading pollen
#

and vice versa assembly is js the readable version of bytecode

hasty mesa
#

asm is machine code

#

bytecode is similar to asm as its an instruction but its instructions for the interpreter

fading pollen
#

ohhh

hasty mesa
#

asm is instructions for the machine

fading pollen
#

so basically machine code from compiler bytecode for interpreter?

#

kind of?

ancient root
hasty mesa
fading pollen
#

okay okay okay

#

and how do you have access to the bytecode? is this a website or smth?

hasty mesa
#

and luau provides tools

#

to read it

fading pollen
#

that's amazing

#

can i have the website rq? i'd like to save it for later

hasty mesa
fading pollen
#

yep that's perfect tysm!

ancient root
#

order matters?

#

tf?

hasty mesa
#

what you are seeing is just noise

fading pollen
#

no idea why but

hasty mesa
fading pollen
#

nvm that was my game starting

#

lmfao

fading pollen
#

to just bench a loop and see which loop took longer

hasty mesa
fading pollen
#

ohh no i know but i meant when benchmarking something small overall

hoary cedar
hasty mesa
hasty mesa
lament moss
#

anybody tryna test a system w me?

graceful cargo
#

Or other scripts if you are playing the game with Client instead of running it as a server

#

The noise could be due to loading

fading pollen
#

noise always happens in computer science

#

and in every science actually

#

lmao

graceful cargo
fading pollen
#

nope

#

even if you stop every single process and magically isolate every single thing, the electricity will still travel at slightly different speeds, particle alignement inside the computer will change, etc etc

#

physics are random by definition, so computer science will be too

graceful cargo
fading pollen
#

in a perfect world the average will indeed converge to the same when you go to infinity, but from a case-by-case basis it will never ever be the same value

#

well it could, but the probability is like 1 in god knows how many lmao

median carbon
#

how do i improve more on scripting bruh

cold marten
#

make small game

stable minnow
#

I am trying to learn scripting/coding for years now... anyone got any tips for a beginner?

stable minnow
#

Thats what i started with lol

stable mirage
turbid plume
turbid plume
stable mirage
crisp wind
#

pro tip: anchor your scripts

stable minnow
#

How you do that?

turbid plume
stable mirage
crisp wind
stable minnow
#

How did you guys learn scripting?

stable mirage
stable minnow
#

I started 2 years ago and it still feels like i am a newbie at it

turbid plume
stable mirage
stable minnow
#

NOPE, its the exact opposite I never really understood how to get good at it

#

its called laziness

crisp wind
stable mirage
stable minnow
#

Thats what chatgpt told me lol

wise turtle
#

like i guess

stable mirage
stable mirage
stable mirage
stable minnow
#

Thats one person I saw in 2 years of AI existance that doesn't like it

turbid plume
stable mirage
turbid plume
stable minnow
#

thanks

#

I guess i gotta swith up my learning strats

stable mirage
stable minnow
#

Not sure of i can agree with that

turbid plume
#

I just saw my friend created a fps combat game using AI in studio within 5 min I was like Ahhh.

eternal apex
stable mirage
stable minnow
#

True

stable mirage
eternal apex
#

Who thinks of a game like that and thinks BRAWLHALLA

stable mirage
eternal apex
#

You saying BRAWLHALLA made me angry

stable mirage
eternal apex
#

Well I just wanna make the system and somehow sell it

stable mirage
#

i have NO IDEA how to make that im new at scripting

stable minnow
#

ask ai how to make one of those

#

easy

stable mirage
eternal apex
#

Well damn

stable minnow
#

Does stuff like that actually sell for 2k?

eternal apex
#

It’s the system itself

stable minnow
#

Alr I am asking ChatGPT for a Tutorial on what ever you made

stable minnow
#

Should be a good way to learn right?

fickle dirge
#

a

turbid plume
#

I started learning lua few days ago, now I can write such codes with little bit of difficulty, I want to know is my code okay as a beginner?

local mainGame = game.Workspace:WaitForChild("MainGame")

local plate1 = mainGame.Plates:WaitForChild("Plate1")
local plate2 = mainGame.Plates:WaitForChild("Plate2")
local plate3 = mainGame.Plates:WaitForChild("Plate3")

local plates = mainGame.Plates:GetChildren()

local playerToPlates = {}

for _, plate in ipairs(plates) do
plate.Touched:Connect(function(otherPart)
local character = otherPart.Parent
if not character then return end

local humanoid = character:FindFirstChild("Humanoid")

if humanoid then
  local player = game.Players:GetPlayerFromCharacter(character)
  
  if player then
    playerToPlates[player] = plate
  end
end  

end)
end

while true do
local safePlate = plates[math.random(1, #plates)]
task.wait(10)

for _, player in ipairs(game.Players:GetPlayers()) do
local character = player.Character

if character then
  local humanoid = character:FindFirstChild("Humanoid")
  
  if humanoid then
    if playerToPlates[player] ~= safePlate then
      humanoid.Health = 0
    end
  end        
end

end
end

gray mantle
turbid plume
gray mantle
turbid plume
#

Okay

gray mantle
# turbid plume Okay

Id say your logic is a bit too extended, and you should use inverted ifs to shorten your code and indentation

#

I.e. player in your touched function is just

#

game.Players:GetPlayerFromCharacter(hit.parent)

#

You dont need to search for character and humanoid

#

And you can do inverted if like so

#

if not player then return end

turbid plume
thick radish
turbid plume
#

That reference was useless i removed it

thick radish
#

and its very good, you made sure you check the model if its a actual character, not just a model

turbid plume
#

At first i thought i would use it somehow but at the end i end up using loops

thick radish
#

its alright to use loops ❤️

#

goodluck on your scripting journey

turbid plume
glossy flower
#

ain't no way no one typed anything in 40 mins

pine hearth
#

Can someone help me with a InventoryUI? So when I equip a tool it goes into my backpack even though I have a script preventing it from going inside of my backpack for my InventoryUI and when I try to unequip it, it just's equips again.

pine hearth
#

Can't post video here.

thick radish
#

dms ❤️

cyan palm
#

hi guys, im trying to make this like bot, it posts an embed with a button, when u press the button it should show the next embed as ephermal, for some reason tho it's not working, the buttons don't work and i'm getting "unkown interaction", anyone know how to fix it?

wanton pecan
wanton pecan
indigo umbra
#

Can do any script, you can pay me after completing or we use mm ( I’m not going first unless you are trusted)

primal sky
icy heron
#

If total force is the same as extra force itll pass

#

Unless your variables are wrong that isnt how it should sork

cloud brook
#

his logic just doesnt work and not good

idle stream
#

Does anyone have a good advice how to make own economy system in robloxstudio?

wooden harbor
#

just money?

idle stream
#

a good system

idle stream
regal salmon
#

economy and analytics are very different

idle stream
#

I find it myself out

final skiff
#

guys im finding ppl to help me build my game, and potentially build a dev group. dm meeee

wooden harbor
unique sage
glacial girder
#

guys i learn opengl old version

glacial girder
#

guys what i do next with opengl

grim void
glacial girder
#

can you show your code?

grim void
polar zealot
#

WHO NEEDS SCRIPTER TO MAKE MENUS OR SHOP GUI AND OTHER ESSENTIAL STUFF

small prawn
# grim void

Theres prob a better way to do it but its fine

ashen scarab
#

whats better manual coding or using agents

small prawn
#

Manual

#

Wait wdym agents

#

Like ai?

ashen scarab
#

yea connect studio to vs code and rojo

#

and codex

#

the problem i face with agents is that they create instances for explorer this makes it very messy

regal salmon
#

though i personally prefer writing code myself, i don't use ai to directly code very often

ashen scarab
#

pretty sure agents rn r not very advanced and can only be used to make slop like brainrot

regal salmon
#

but you shouldnt really just let ai code for you (aka vibe coding), you should use it to assist you instead

regal salmon
#

just tend to make mistakes and write worse code than a knowledgable human would

ashen scarab
#

how can it assist me?

#

debugging?

regal salmon
#

when it comes to debugging though, make sure you actually know what it's talking about and what you want

#

sometimes what it points out isnt unintentional

small prawn
#

Ive made the mistake of using ai for my code and trust me it gets really bad, and if u ever want to add features its gonna be hard because the ai code

#

I have completely restarted my game due to this

eternal thorn
mellow frigate
#

anyone know a scripter who sells tycoon kits

abstract sentinel
#

progress on that project, made some cool designs and yeah working on the core gameplay rn

rocky pecan
#

how do you genuinely start learning luau

#

i do NOT want youtube tutorials those suck for me

uncut nest
#

dev forum and roblox official docs could also help

rocky pecan
winter oyster
#

Anyone here want to make a slop game?

hearty falcon
#

im a beginner scripter can i have some help fixing this script i want to do when touched death then colour changes random

#

this is it

#

local Death = workspace.DEATH

local rng = Random.new(.Color3.fromRGB(rng:NextInteger(0,255),rng:NextInteger(0,255),rng:NextInteger(0,255))

)

Death.parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent:BreakJoints()
end
end)

#

its not working i need help debugging

#

nvm fixed

nimble bear
#

wow

hearty falcon
#

i made it

dire haven
gloomy compass
#

replace "Death.Color" with something like "workspace.Part.Color" or smthin

dreamy phoenix
#

Do tycoon games go viral?

gloomy compass
#

sometimes

hearty falcon
#

im stuck rn

#

game.Players.PlayerAdded:Connect(function(player)

local leaderstats = Instance.new("Folder", player)
leaderstats.Name = 'leaderstats'

local Points = Instance.new("IntValue", leaderstats)
Points.name = 'Points'

local xp = Instance.new("IntValue", leaderstats)
xp.name = 'xp'

end)

gloomy compass
hearty falcon
#

itrs not working

thorny vessel
#

Is there's some sort of free Mentorship

hearty falcon
#

i can only see value

#

i want to see points and xp

thorny vessel
#

lemme check my proj rq

hearty falcon
#

ye i think it is

night drift
#

What are yall thoughts on vibe coding?

hearty falcon
#

whats that 😭

night drift
#

Using ai to help you with coding

thorny vessel
# hearty falcon i want to see points and xp

I'm also still learning so correct me if im wrong. This is my example:

game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player

local money = Instance.new("IntValue")
money.Name = "Money"
money.Value = 50
money.Parent = leaderstats

end)

thorny vessel
night drift
hearty falcon
#

ok

#

ive been trying everything to try deubug it

night drift
#

local leaderstats = Instance.new("Folder", player)
leaderstats.Name = 'leaderstats'

local Points = Instance.new("IntValue", leaderstats) 
Points.Name = 'Points'

local xp = Instance.new("IntValue", leaderstats) 
xp.Name = 'xp'



end)```
hearty falcon
#

cause im watching dev king because hes teachhing

thorny vessel
hearty falcon
#

yea i finshed watching him

thorny vessel
night drift
#

Also it better to do the parenting after like this local Points = Instance.new("IntValue") Points.Parent = leaderstats Points.Name = 'Points'

thorny vessel
#

^
Yea I also recommend it. At the very least, It helps me know what values are and which instance is rooted this from

night drift
#

anyone got something i should try making im maybe intermediate started 2 weeks ago

agile topaz
agile topaz
#

instance.Parent is old way and kinda fills your codes

thorny vessel
agile topaz
signal narwhal
#

Can anyone make a game with me

thorny vessel
night drift
#

could cause some timing issues is what some have told me but i could be wrong

thorny vessel
night drift
agile topaz
#

you need to assign it manual

thorny vessel
agile topaz
thorny vessel
agile topaz
agile topaz
#

random.new() is a seed

hearty falcon
#

ohhhhhhhhhhhhhhhhhh

stuck bone
#

Did anyone find a way to fix or bypass the Sky Destroyer AXEzz script issue

north elm
#

is it possible to do this guys
Player joins my game
They get teleported to another experience I don’t own
I want control over which exact server they join (not random matchmaking)

magic spruce
#

Isn't the roblox ai nice to scripting

ancient root
#

With const existing now, should we do const function functionname() end or local function functionname() end

halcyon berry
agile topaz
#

you dont need to verify if its a model

#

since anything that have humanoid will get killed

surreal junco
#

Guys

#

Hello

#

Good evening

north elm
#

does anyone here knows how to find a jobid?

clever sapphire
leaden remnant
#

is it dangerous to have a dataservice (the one from leif(youtube)) in replicated storage, it has client and server version but exploiter can get acces to it if everything is avaible for clientit right?

kind notch
#

i got recommended to make a discord acc and join this server how do i get image permissions

agile topaz
leaden remnant
agile topaz
#

he is just showing example and not for production use btw

leaden remnant
#

but it also has a client networker and dataservice

local server = require(script.DataServiceServer)
local client = require(script.DataServiceClient)

export type Server = server.DataServiceServer
export type Client = client.DataServiceClient

return {
server = server,
client = client,
}

agile topaz
#

why client need datastore access??

north elm
agile topaz
clever sapphire
# leaden remnant is it dangerous to have a dataservice (the one from leif(youtube)) in replicated...

"get access to it" is only true in the sense that clients can see the module's code. however... that is a complete non issue in this case since the code is already available online and open source

if you are worried about clients being able to "peek into the server code and freely change anything," then dont worry: that is simply not possible

module scripts must be required from either the client or server. when they are required, they exist only in that context. for example, the server gets their own server-sided version of the module. the client CANNOT see any mutated data inside of this server version

clever sapphire
#

if you really dont want the server side to exist in replicatedstorage, thats also perfectly fine

#

you can simply move it to serverscriptservice, then tweak anything that is required

clever sapphire
#

with exploits you could probably get the jobid of a server you are in

leaden remnant
agile topaz
#

btw ngl client for datastore fetching is weird

clever sapphire
#

it is solely for client replication of server data

north elm
clever sapphire
clever sapphire
leaden remnant
#

are u sure, chatgpt says the completely opposite

clever sapphire
#

the only "security risk" is the fact that the client can see the code, which is not an issue at all. for example, ProfileStore itself is completely open source. anybody can see the code

#

same logic here

agile topaz
clever sapphire
agile topaz
#

make sure to actually verify remote and stuff in replicatedstorage

clever sapphire
#

let me show you an example rq

agile topaz
clever sapphire
#

each environment gets their own copy of the module

leaden remnant
#

i already moved my module loader into 2 versions, client verison and server version

clever sapphire
#

does not replicate between server and client or vice versa

clever sapphire
leaden remnant
clever sapphire
#

i believe he misunderstood what the dataservice client side was doing. its all g

minor hazel
#

is scripting the best way to go?

clever sapphire
#

it just creates a client sided copy of the data that is automatically replicated to and can be reacted to

clever sapphire
agile topaz
crimson drum
agile topaz
#

i thought it was directly grabbing the data from datastore 😭

clever sapphire
minor hazel
agile topaz
#

which suck

leaden remnant
clever sapphire
agile topaz
#

there is bridge module and stuff to do data transfer and not using remoteevent

clever sapphire
minor hazel
clever sapphire
# clever sapphire its negligible in this case

youre paying a slight bit of bandwidth usage for extreme ease of use. you could even further decrease this by:

  1. (unsure if leif's dataservice has this) preventing automatic server -> client replication of some paths
  • use a networking module to compress the payload massively
agile topaz
clever sapphire
minor hazel
clever sapphire
#

scripting will get you the most job offers and such

clever sapphire
crimson drum
clever sapphire
minor hazel
clever sapphire
#

then for sure, go for it

agile topaz
minor hazel
#

should i start with lua tho? that way i can sell things from roblox in the future?

crimson drum
clever sapphire
#

just be aware that even though scripting on roblox is advertised in this "beginner level thumb sucking coding" package, there is a ton of complexity to it as you get deeper. but it is super easy to get into

crimson drum
#

just basic programming skills

clever sapphire
minor hazel
#

aight tysm

#

i was also learning vfx, yall suggest to do both at the same time? or just focus on scripting

clever sapphire
#

you really dont need to create your own networking module unless you are running into a serious bottleneck or you just like recreating the wheel, which is also fine

agile topaz
clever sapphire
crimson drum
clever sapphire
#

frontend scripting, at least

agile topaz
#

python is easy once you got more into lua

crimson drum
#

if i cant then oh well

clever sapphire
#

to animate some more complex parts of vfx

crimson drum
#

but ill try atleast

clever sapphire
#

it really isnt that hard to create a basic networking module with buffer serialization and deserialization

agile topaz
minor hazel
clever sapphire
agile topaz
clever sapphire
#

let me try and show an example of vfx thatd require scripting if i can find some on twitter rq

clever sapphire
#

or actually i can js check syntax's work. hes goated

#

if you also have any curved projectiles or such, thats scripting

minor hazel
#

yeah i want to make those

#

ill just watch some tutorials on yt for it ig and start messing around

#

ty yall

clever sapphire
#

for sure. good luck man

agile topaz
tribal meadow
tribal meadow
gloomy compass
#

im surprised how they detected that code as AI

wise turtle
gloomy compass
#

i mean you cant detect if a code is by AI or not...

tribal meadow
gloomy compass
# tribal meadow I agree

ye cuz it's literally next to impossible. i mean what are you gonna check? plagarism in the code? yeah good luck. they finna gonna ban us cuz i used the local keyword 🙏

tribal meadow
#

lwk

#

some guy said that I could just wrap both the database code snippets in a function 😭

night hemlock
tribal meadow
gloomy compass
#

which ones? i apparently can't see the code cuz pastebin is banned where im from 🙏

wooden harbor
tribal meadow
gloomy compass
#

cuz like it lacks originality and when you're using AI for say, a commission

#

it really is just scamming the person at that point

tribal meadow
wooden harbor
gloomy compass
#

compare a humans art vs that of an AI

#

you see a major difference.

tribal meadow
gloomy compass
gloomy compass
#

wanna use it for your games as placeholders? fine. go ahead.
but don't use it for commissions, events, etc etc and if you REALLY want originality and some quality and "human" feel to any work, just don't use AI to do it.

tribal meadow
#

Some guy decided to alter my appeal to a scam appeal🥀

gloomy compass
#

anyways yap session ended. i should lowkey work on my game 😭

tribal meadow
#

Rodev mods are onto smth 😭

#

Alright man

#

gluck

gloomy compass
tribal meadow
odd pollen
#

As long as you understand all the code and can debug and edit seasminglessly it doens tmatter too much

wooden harbor
odd pollen
#

given the code isnt trash

tribal meadow
#

Yes

odd pollen
#

vibe coding gets bad when you have 100+ lines of code u dont even know exist or what they do

wooden harbor
odd pollen
#

is rodevs even a good server

tribal meadow
gloomy compass
wooden harbor
gloomy compass
odd pollen
gloomy compass
#

any topic, a custom camera system, movement system, wtv.

#

let's see if it has "quality" or not.

wooden harbor
gloomy compass
#

will it be full of bugs? lacking security? lacking flexibility? or will it actually be something the future will be built upon

gloomy compass
wooden harbor
#

A cyber sec researcher got AI to exploit thousands of vun in open source projects including linux

gloomy compass
quick quartz
wooden harbor
#

thats just to create hype

#

to justify their absurd plan prices

#

i believe

gloomy compass
#

i tried searching it's just about mythos

wooden harbor
gloomy compass
#

bro who the heck reacted with the pregman emoji 😭

#

💀

odd pollen
#

HEy claude, hack roblox and give me 1b robux 🤑

gloomy compass
wooden harbor
gloomy compass
#

Hey claude, hack the white house and gimme 69 billion dollas

gloomy compass
odd pollen
#

Bro they atually cant realess mythos or i will hack everythin 💀

wooden harbor
#

its an old post

#

mythos just in keywords

odd pollen
#

its about opus 4.6

gloomy compass
odd pollen
#

lol sql

wooden harbor
gloomy compass
wooden harbor
gloomy compass
odd pollen
#

Just ask ai how to prompt ogod

#

good

#

And make it prompt for you

gloomy compass
gloomy compass
#

man how much do i have to yap to be able to post links :(

#

i want to unleash my degen meme list /joke

odd pollen
#

Do any of you hit your usage limits with Claude or codex

gloomy compass
odd pollen
#

Has anyone here tried to learn a memory language after something like lua or python

#

How hard is it

gloomy compass
#

C is very easy tbh

odd pollen
#

People on Reddit say it’s not hard

gloomy compass
#

same for C++

#

not that hard

#

you get the hang of it after a while

odd pollen
#

Some people said learn C before C++ but others said that good C code is trash C++ so you’ll be wasting time

gloomy compass
#

C++ is literally C with a few mor things

#

C gives you a good idea on memory management

#

C++ is like the upgraded tutorial

odd pollen
#

Kk

gloomy compass
#

ye

odd pollen
#

How how much experience u got with C and C++

gloomy compass
#

like i'd say im decent..?

#

not the best, not the worst.

wooden harbor
gloomy compass
#

C and C++ are very similar but C is good for beginners as compared to C++

#

learning C then going to C++ is a good strat imo.

#

rest is upto whoever wants to do whatever.

odd pollen
#

I’ve seen like memes about c++ template errors

wooden harbor
odd pollen
#

I heard meta banned template metaprogramming because it added unnecessary complexity

wooden harbor
zinc sand
#

any good public state managers out rn?

wooden harbor
bleak glade
zinc sand
#

you've used it?

bleak glade
zinc sand
zinc sand
odd pollen
zinc sand
#

nvm I read it wrong

wooden harbor
bleak glade
#

theres actual getters and setters instead of a single function for both

wooden harbor
twilit parrot
#

where do i find a scripter

visual tree
gloomy compass
quick dock
#

is there is something I can open report UI for a player with or like at least roblox player list ?

manic lichen
#

instead of a terminal, can sitting down watching brawldev yt on a big 48inch tv and writing down code in your notebook be effective too?

somber linden
#

Terry Davis Roblox Studio tutorial

solemn dawn
#

and died

fleet carbon
#

anyone down to make a game, where you gotta throw your phone really hard, for points 🤔

jovial moat
#

Take my money

#

Add detection for when it hits a wall

#

For bonus points

sturdy turtle
#

Would anyone be interested in a rocket league heatseeker type game

hybrid basin
lost gulch
ancient moon
#

quick question

#

Is it possible to add delay to weld?

glacial vault
# ancient moon Is it possible to add delay to weld?

Yeah, just wrap it in a task.delay:
task.delay(2, function() local weld = Instance.new("WeldConstraint") weld.Part0 = partA weld.Part1 = partB weld.Parent = partA end)
Change 2 to however many seconds you want the delay to be.

#

If it is what I think your trying to say atleast.

ancient moon
#

lets say i connect a part to the humanoidrootpart using weld

#

and i want that weld to have a bit of delay so like when i move the part will also move after the delay is done

#

rather than moving the same time im moving

glacial vault
#

Ah got it, you want a lag/follow delay effect not just a delayed weld. For that you'd use a loop that smoothly lerps the part toward the HRP position instead of a weld:

local part = -- your part
local hrp = character.HumanoidRootPart
local SPEED = 0.1 -- lower = more delay
game:GetService("RunService").Heartbeat:Connect(function()
part.CFrame = part.CFrame:Lerp(hrp.CFrame, SPEED)
end)
The lower the SPEED value the more it lags behind. A weld won't give you that effect since it moves instantly — lerp is the way to go for this.

#

I think I answered your question.

ancient moon
#

i am using CFrame.lerp

#

but when used on server, it becomes bad

#

it aint smooth at all

#

so i use on client

#

but no one sees it

#

so how can i fix that/

glacial vault
#

Yeah that's a classic network ownership issue. The fix is to move the part on the client but use a RemoteEvent to tell the server the position so other players can see it. But honestly the cleanest solution is to just set the network
owner of the part to the player:

part:SetNetworkOwner(player)

Put that on the server when the part is assigned to the player. Once they own it, their client controls the physics and movement and everyone sees it smoothly — no RemoteEvents needed.

If it's an unanchored part this should work straight away. If it's anchored you'll need to keep the lerp on the client and sync position to the server periodically with a RemoteEvent.

#

Should be able to fix your issue.

ancient moon
#

setnetworkowner?

#

so after i lerp it

#

i can just do that

#

and everyone will be able to see it

#

and plus

#

the client will handle the physics and stuff

#

which will make it look better

glacial vault
# ancient moon the client will handle the physics and stuff

Exactly, but just to clarify SetNetworkOwner doesn't work with lerp directly. Here's the distinction:

If the part is unanchored:
Just do part:SetNetworkOwner(player) on the server and the client automatically handles the physics. Everyone sees it smoothly, no extra work needed.

If the part is anchored:
Network ownership doesn't apply to anchored parts. You'd need to lerp on the client and use a RemoteEvent to sync the position to the server so it replicates to everyone else.

So which one are you using — anchored or unanchored?

ancient moon
#

and its all unanchored

glacial vault
#

Perfect, then it's simple. Just set the network owner on the server when the rig is assigned to the player:

rig:SetNetworkOwner(player)
Then do your lerp on the client like you already are. Since the client owns the network, their movement will replicate smoothly to everyone else automatically. No RemoteEvents needed

grizzled crystal
#

what is the best way to code a projectiles? like should I fire instantly to the client and mark the time with getservertime then send it to server to fire for everybody else?

glacial vault
balmy sorrel
grizzled crystal
#

so I was somewhat right?

balmy sorrel
#

Pretty much

#

I recommend doing hit detection on the client and validating the projectile trajectory on the server

plush oxide
#

how does animating work in a viewport frame?

grizzled crystal
balmy sorrel
#

You can add a valid range of time for the shot to hit it's target like 1 or so seconds

#

if the client hits the target outside of the valid time frame from the time the shot was fired then you can choose to invalidate the shot.

balmy sorrel
plush oxide
#

or nah

balmy sorrel
pale jacinth
#

so erm who ccan help me rq

#

with gui scaling problem

glacial vault
pale jacinth
#

if you wonna join voice i can show

glacial vault
#

yeah

#

@royal hamlet

#

i could help you whats wrong?

rocky skiff
#

@glacial vault

#

big question

#

big very important question

glacial vault
#

yes

mighty mirage
rocky skiff
# glacial vault yes

can server scripts in roblox accidentally share state between sessions because of module script caching? bcuz i'm seeing data persist across matches when using modules as singletons. is require() caching causing this? or wha

pine hearth
#

Can someone help me with a InventoryUI? So when I equip a tool it goes into my backpack even though I have a script preventing it from going inside of my backpack for my InventoryUI and when I try to unequip it, it just's equips again.

glacial vault
# rocky skiff can server scripts in roblox accidentally share state between sessions because o...

Yeah require() caching is exactly the cause. The module loads once when the server starts and stays in memory the whole server lifetime so any state stored inside it like player tables or scores never resets between matches unless
you explicitly tell it to.
The fix is just add a reset function and call it at the start of each match:
function Data.reset()
Data.players = {}
Data.scores = {}
end

Call Data.reset() when your new round starts and you'll have clean state every time. The caching itself isn't a bug — just make sure you're not relying on the module to reset itself because it never will.

regal salmon
#

ai response 🙏

broken grove
#

wdym by between sessions

#

and what data persists

rocky skiff
rocky skiff
glacial vault
#

Exactly right. Manual reset is fragile if any code path skips it or errors before it runs you're back to leaking state. Scoping per match instance is the cleaner architecture

rocky skiff
#

by sessions i mean like individual server instance. a match or round can restart inside the same server without the server actually shutting down. modules are cached per server process so anything stored in a module table (like player data cores wtv you got) will persist for as long as that server is alive. it doesn’t reset between rounds unless you manually clear it or recreate the state

regal salmon
rocky skiff
#

i expected a real reply but

#

atp i might js dip and ask claude itself

regal salmon
#

😭

broken grove
#

not claude

#

thats gotta be chat gpt

#

since its so willing to just hallucinate details

glacial vault
#

If you want to compete then ig.

regal salmon
glacial vault
#

Believe what you want.

#

Its not like ur helping anyone here 💀

regal salmon
#

i never said it wasnt helpful, i didnt reply because you already had
i'm just pointing out that you're using AI to respond and it's taking longer than if they went and used AI on their own

glacial vault
#

At this point your just rage baiting.

regal salmon
#

lmfao

#

this guy yo

pale jacinth
mighty mirage
#

Ohh I see

balmy sorrel
#

Dugga

thick radish
#

you cant call yourself a coder/scripter if you used ai to do your nasty work

#

such a embarassment 🙏

thick radish
glacial vault
thick radish
glacial vault
#

like

glacial vault
#

your not even in my server how would u even know 💀

thick radish
#

i check it

#

and leave immediately

#

your anti-cheat script is entirely ai. even the description is ai. whys that

glacial vault
#

Alright so what are you proving like how are my scripts ai

#

dawg

#

explain how

rigid cedar
#

ragebait competition

thick radish
rigid cedar
#

im good bro

thick radish
#

because i would like to show you the explaination

glacial vault
thick radish
glacial vault
#

because im not insecure I dont need to prove to a little kid like u on discord all day telling me im wrong like who is you.

thick radish
#

im not wrong or right. using ai to explain someone's help is bad because theyre outdated and not right all the time!

rigid cedar
glacial vault
#

nah

rigid cedar
#

dude literally has an em dash in it too

glacial vault
#

I didnt say it wasnt

#

I admit it use ai?

thick radish
#

i will check your port again

glacial vault
rigid cedar
#

and you expect people to believe your competency if you have to reply to a basic question on how module scripts work with ai

#

im just saying man

thick radish
thick radish
glacial vault
thick radish
#

not entirely the same but similar

glacial vault
#

bro

glacial vault
thick radish
#

it does?

#

it really does

#

and i want to end this arguement right now

#

because this is nonsense to use ai to act like a developer

glacial vault
#

How if it isnt the same I could go to ai rn and go ask it to make a admin system that is the same

#

Like you dont make sense

thick radish
#

and use the same prompt like you did on the admin system please.

tacit plank
#

whats going on

glacial vault
#

what im saying is that not matter whos admin system ai is going to try to get super similar results

thick radish
thick radish
tacit plank
thick radish
tacit plank
thick radish
tacit plank
thick radish
#

i will ask claude to generate a admin system ui and give you the result

tacit plank
#

bad

glacial vault
#

Senior devs at actual studios use Copilot, Chatgpt, everything. using a tool doesn't make you less of a developer, not understanding what you built does. I can explain every system in that admin system line by line the rank hierarchy, the remote event. system, the tween values, why the overlay is a TextButton and not a Frame. can someone who just copied AI output do that? ask me anything specific right now.

#

Like

#

your honestly wrong

tacit plank
thick radish
#

im ready to ask questions

glacial vault
thick radish
#

dont use ai ❤️

glacial vault
#

You dont have anything.

thick radish
#

how would you make a Announce button in that admin system. how does it work

glacial vault
#

Exactly, because you think its ai but its not.

thick radish
glacial vault
#

Im answering it right now hold on you messed me up

modern seal
#

ai is okay imo under a few circunstances

  • codebase is heavily obfuscated unreadable
  • slop game who cares tbhh
  • debugging tool
thick radish
tacit plank
#

if its a huge script

glacial vault
#

the anounce command fires a remoteevent to the server which then like broadcasts it to every client and then each client has a listener that slides a banner down from the top showing the message

#

like

modern seal
thick radish
glacial vault
#

give me more question

#

questions

#

**

tacit plank
#

maybe for when i forget

tacit plank
#

placing comments

thick radish
thick radish
tacit plank
rigid cedar
#

but if tuned right or used correctly you can save yourself a ton of time actually writing the code

thick radish
glacial vault
#

The ban stores the player's UserId in a BanList table on the server. When the player joins playeradded checks if their UserId is in that list and kicks them immediately if it is. So even if they rejoin they get kicked on entry before they can do anything its honestly common knowledge.

tacit plank
#

i do know how to comment btw

#

just saying

#

sometimes i js get confused

rigid cedar
#

having actual technical knowledge allows you to cut down the time you spend on designing the systems and fixing usually obvious design or technical flaws which still is much better than writing code yourself if you understand the underlying design

thick radish
glacial vault
#

The only reason I have used ai for the description of my scripts beacause it makes it sound more elegant

glacial vault
thick radish
rigid cedar
#

and personally i use ai all the time nowadays saves me a lot of time writing code i cant be bothered to write myself as long as i vet it

thick radish
glacial vault
#

Is that bad now

glacial vault
#

Im not a writer,

tacit plank
#

why u need it to be elegant

thick radish
tacit plank
glacial vault
thick radish
tacit plank
#

make it elegant for a script inspector

rigid cedar
#

yall are just witch hunting if you believe using ai to write an elegant description isnt actually valid

tacit plank
#

nicce

thick radish
#

its not like william shakespare writing

rigid cedar
#

not that i believe he's not using ai to reply to your questions but it's a step too far

thick radish
#

please look up 💔

thick radish
#

it just looks unnatural, "Exactly right"

glacial vault
#

Bro

glacial vault
#

I dont know what to say anyone you ragebaiting at this point

rigid cedar
#

ragebait competition

thick radish
#

no keyboard has "—" key

thick radish
#

if you want to rely on ai entirely, go for it. its just laughable when you want to vibe coding and be called "Professional coder"

tacit plank
#

ragebaiting you

#

lol

thick radish
glacial vault
#

what

glacial vault
thick radish
glacial vault
#

like it snot

thick radish
#

@tacit plank check at it ❤️

#

whenever its a — or -

glacial vault
#

--

#

its possible

#

like

rigid cedar
#

an em dash is not two dashes bro

#

— -- -

#

completely different symbol

#

you need to hold alt and press 0151 on your numpad to type that in anything other than a word processor lol

glacial vault
#

I didnt say what i said earlier wasnt ai im saying my work isnt ai

thick radish
#

god gave you a brain for you to think, not ai ❤️

tacit plank
#

AI uses M dash

#

dead giveaway

thick radish
#

too bad ❤️

glacial vault
rigid cedar
#

perfect is an overstatement

glacial vault
thick radish
rigid cedar
#

i enjoy reading really well written works like those

tacit plank
thick radish
glacial vault
rigid cedar
#

im just an admirer

glacial vault
tacit plank
#

read it

glacial vault
#

Idk if its an insult

#

or something good.

tacit plank
#

idk you

glacial vault
#

Okay

glad apex
#

why is it that when i print tostring(PlayerData) (module) it will print 2 different things
playerdata.profiles (a table) has data inside of the playerdata module itself but when referenced externally it has nothing

thick radish
glad apex
#

a module requiring another one

thick radish
#

because same thing happened to it. i have to use it in server to server

glad apex
thick radish
glad apex
#

nvm i foudn the problem my bootstrapper is broken

thick radish
#

bootstrapper has that problem?

glad apex
thick radish
#

ahh alright. thats interesting, glad you solve it yourself ❤️

merry hull
#

Is there any solution to preventing user from flinging

#

my dash code use BodyVelocity and MaxForce

cold lion
#

how to get the fav prompt and group join prompt

idle stream
#

Guy what is UIAspectRatioConstraint and how I can work with them? Have any one a good tutorial or smth for me pls praysob

dense spade
#

why is ur icons like that

lost burrow
# dense spade why is ur icons like that
idle stream
idle stream
#

@lost burrow any chance that I can get premission to send images?

#

nvm

drifting ice
#

hey guys is it a good way to learn code to find a copy of a game i like and look at the code and learn from that?

#

my friend advised me to do this

clever kindle
#

yes it is

#

but if advise

#

you have a good understanding of the basics first

#

otherwise you won’t understand any other game you look at

drifting ice
#

i did a tutorial series and i somewhat understand what stuff does