#code-discussion

1 messages · Page 47 of 1

foggy burrow
#

it doesnt matter

#

if its collideable

#

then something is wrong with your anims bro 😭

ripe oyster
#

no

#

maybe since its a blender anim

foggy burrow
#

No game disables head collisions or torso collisions for animations dawg

#

so

#

I would check out your animation

#

cause I dont think that there is any way to get rid of torso/head collisions effectivly because Roblox constantly updated the property

#

and if your just doing that for anims then fix your animation because your anim is wrong

tropic plume
#

@ruby cipher just reacting to everything 😭

#

lol

potent igloo
#

Yeah but then the client would have to wait for the server response before playing the vfx

foggy burrow
#

no

#

well yeah

potent igloo
#

Which ruins the point of a client hitbox

foggy burrow
#

but bro thats gonna be instant

potent igloo
#

Its not

foggy burrow
#

or on the server

#

but client hitboxes are much more performant

potent igloo
#

For ppl that play above 100ms ping will notice it

foggy burrow
#

Nah 300 ping

#

unless your game is not performant at all

foggy burrow
#

slide show

potent igloo
#

My idea was to play the effect and animations regardless if it hit on the server or not, then the server would respond the true hit and the client would remove the vfx and anims if the server didnt register the hit

foggy burrow
#

I would look into it]

ripe oyster
foggy burrow
#

i aint a animator

potent igloo
#

Which would feel really good when hitting but very inconsistent when not hitting

foggy burrow
#

but it aint roblox

foggy burrow
#

like

#

do you mean the server would display the true vfx and stuff

#

after it truly hit

potent igloo
#

No

#

The client will display the vfx and animations regardless of server hit

#

If the server doesnt hit, the client will rollback

foggy burrow
#

I mean

#

Sure ig

#

but thats still gonna be noticable

#

noticeable

#

fuck i cant spell

#

anyway

#

the client server client is probs the best way to do it

#

thats how I do my block vfx

#

and its pretty good

#

Client lag

#

will cause the vfx to take longer to roll back if the hit aint valid

solid fulcrum
#

quick question, whats the point of writing 1, 100000 if ill just have a break statement at 200? why not just write 1, 200

foggy burrow
#

bro is this a real question

solid fulcrum
foggy burrow
#

well you anwered your question in your question

#

no theres no point

#

if it ends at 200

#

plus

#

get rid of the continue

#

the loop is gonna continue anyway

solid fulcrum
#

the screenshots from a video teaching me about break 💔

#

but i see

foggy burrow
#

well if its teaching you about break

solid fulcrum
#

so whats the purpose of break then..

#

i guess its rendered useless

foggy burrow
#

then yeah makes sense why they wuld set it up like that

solid fulcrum
#

yeahh

foggy burrow
#

well in this instance they are just showing you how it works

#

by saying

#

your looping 100000 times

#

but at the 200th youll stop

solid fulcrum
#

by breaking

foggy burrow
#

and you do that with break

#

yeah

solid fulcrum
#

yeah

#

alright fire thx

foggy burrow
#

they are just showing you how it works'

solid fulcrum
#

id just wanna knwo what other use break has

#

other than this situation

foggy burrow
#

well it has many

#

break doesnt just work in for loops

#

while loops too

#

lets say your looping through smthn

#

while points > 100 do

#

and then mid way through the loop points is less than 100

#

you would want the loop to end

solid fulcrum
#

ohhhh

#

thats a good way to put iot

#

it

foggy burrow
#

or

#
while points > 100 do
      task.wait(1)
      print("so many points!")
   
     if points < 100 then break end
end

hasty mesa
foggy burrow
#

yeah

hasty mesa
#

but yeah i =1,200 does the same thing

solid fulcrum
#

yeah

foggy burrow
#

type

solid fulcrum
#

alright nice

foggy burrow
#

yes yes

solid fulcrum
#

im learning basics of scripting but ill need to incorporate it into game dev

#

idk how to put it

foggy burrow
#

just take your time

solid fulcrum
#

yup ty

foggy burrow
#

but think stuff through

solid fulcrum
#

btw howd you learn scripting

foggy burrow
#

no question is dumb

solid fulcrum
#

if you dont mind me asking

foggy burrow
#

even if i say it is crylaugh

foggy burrow
#

of practice and self taught

solid fulcrum
#

self taught 😭

foggy burrow
#

just practice

#

but

solid fulcrum
#

mustve been hell

foggy burrow
#

nah not really

#

I enjoy it so

#

I had fun

solid fulcrum
#

all that matters

#

🙏

foggy burrow
#

just dont stick on tutorials bro

solid fulcrum
#

i am 🥲

foggy burrow
#

tutorial hell aint where you wanna be

#

read documentation

solid fulcrum
#

i got this playlist that goes through all beginner then advanced terms on another playlist

foggy burrow
#

I used to watch a shit ton of tutorials

solid fulcrum
#

then after that ill basically be out of the shell and i think ill just

#

practice on my own

foggy burrow
#

aye valid

solid fulcrum
#

scrolling on devforums for hours on end

foggy burrow
#

yeah

#

thats whay I do cry

solid fulcrum
foggy burrow
#

yeah

solid fulcrum
#

so like scripts created by other people in lua

foggy burrow
#

roblox docs

solid fulcrum
#

ohh right

foggy burrow
#

nooo

#

roblox docs

solid fulcrum
#

i do not use that bro

foggy burrow
#

lol

#

its hard to use, i just started but I still aint very good

#

dev forum is where I usally go

#

but dont just use the answer really try to understnad why it works that way yk

solid fulcrum
#

so far got like 30 pages in

#

i write lines of script in the notebook itself and annotate each line

#

all that but i still dont know what an index _, is 😭

#

its like an unknown variable right

#

like similar to nil..

#

i just cant think of a situation to use it in or wherre it would be beneficial

foggy burrow
#

Aye man

bold prairie
foggy burrow
#

i gotcha if you need help

#

just dm me

bold prairie
#

And index is basically the key or ‘name’ for a table value?

#

Maybe not name but it’s position

solid fulcrum
#

i see

#

broo honestly after i finish these basics idek where to start

#

or the slightest idea of how i can combine like how ive been learning "math" or "operators" etc into game development script

bold prairie
bold prairie
solid fulcrum
bold prairie
solid fulcrum
#

he explains stuff quite well

hardy needle
#

using topbar plus how can i make one of the buttons fuction to do something like "autosprint"

wise meadow
#

Guys, I literally just made Crates and Keys through code rather than using images and its soo coool

bold prairie
solid fulcrum
bold prairie
#

Haha how far are you?

solid fulcrum
#

i just need to finish his beginner tutorial playlist then ill move onto the advanced

#

uhh rn im on

vagrant shoal
solid fulcrum
vagrant shoal
#

Integrated development environment

#

Like visual studio code

solid fulcrum
#

ide

#

i see,m how do i start that..

#

and that teaches me how to script quick and fast you imply

bold prairie
solid fulcrum
vagrant shoal
solid fulcrum
#

how well would tyou say you know lua

vagrant shoal
#

For any programming language

vagrant shoal
#

But why not just use Roblox studio

#

?

bold prairie
solid fulcrum
#

i take notes on my notebook then i use roblox studio

vagrant shoal
#

Oh

solid fulcrum
#

taking notes is proven to be more efficient for remembering. plus if i forget i can just go back to my notes

solid fulcrum
vagrant shoal
#

Alright that’s a good strat

solid fulcrum
#

is it like a wesbite..

bold prairie
#

Do you script alongside the tutorials, or do the homework BrawlDev gives you?

vagrant shoal
#

And then install a compiler

#

There’s helpful videos on YouTube

wise meadow
#

Still working on the UI

solid fulcrum
#

ill go check it out

wise meadow
#

And scaling

#

So keep that in mind

#

But, this is fire

vagrant shoal
solid fulcrum
bold prairie
wise meadow
#

Ignore my hilarious coloring btw

solid fulcrum
bold prairie
solid fulcrum
#

you could add variation such as making them the same size, making one much much tinier than the other

wise meadow
solid fulcrum
#

i feel like its klind of all over the place and if i was to click on the ui it would just pop up on my face

valid crypt
#

guys whats a average server client memory

solid fulcrum
#

what i like to do is modify it in a way i would understand

wise meadow
#

Nah it dont pop up on your face it stays in the screen unfortunately

solid fulcrum
#

uhh do you have like a brother or anyone at home

wise meadow
#

lol

#

Im just messing with you, i get what ur saying

solid fulcrum
#

loll yup

#

but youre good man, keep it up!

#

keep practicing itll get much better

wise meadow
#

Theres alot too it, and I just started really messing with Roblox Experiences yesterday, i've dabbled in it from time to time and I've made alot of random UI and Scripts for people in Roblox, But I've never just worked alone on my own Project in Roblox Studio, and Now i am, So, I dont really have any outsider input, just my own brain

#

I also make all of this btw thru code

#

I dont use any Frames or anything like that in game

#

Almost right

solid fulcrum
wise meadow
#

yes

solid fulcrum
#

right roblox ui is super tricky

wise meadow
wise meadow
#

Dont have to worry too much abt scaling

#

as you do on here, Scaling is honestly the biggest thing, cause I have to make this Menu and everything look good on phones and consoles, just like it does on PC

solid fulcrum
#

you said you did this without frame

molten creek
#

hello fellow devs

solid fulcrum
#

and purely with coding

#

thats insane

wise meadow
#

Correct

#

Not a single UI Frame in anything, its all code

molten creek
#

Any non mid scripters existing here

wise meadow
#

But yk, I'm just a chill guy

#

🤷‍♂️

molten creek
wise meadow
molten creek
#

THAT'S THE FIRST PLACE PEOPLE GO ON TO HIRE

wise meadow
wise meadow
#

You shoulda just asked me for my Dev Portfolio

#

or just went to my steam

#

And seen some of the things I have on there

molten creek
#

Brother roblox runs on twitter

wise meadow
#

Screenshots wise

molten creek
#

You should remove it or be banned from this disc lmao

wise meadow
#

I wouldnt know

#

They gonna ban me from this discord cause u opened my Twitter?

#

👀 That seems a lil silly

molten creek
#

Doesn't seem that silly to me

wise meadow
#

I've never hired anyone based off their twitter feed

#

I wouldnt trust that, I mean, I could just download videos or pictures of peoples post and post them like their my own

molten creek
wise meadow
#

Thats dumb asf

#

genuinely

molten creek
#

Entire eco system works like that lmao

wise meadow
#

If imma hire someone, theyre gonna show me their ability to code prior to me hiring them

molten creek
wise meadow
#

Thats pretty dumb, considering there is a whole area on the creator dashboard to post jobs and hire people

#

in this discord

molten creek
wise meadow
molten creek
#

I hire mainly based off twitter

wise meadow
#

What I will say, is if your not logged into twitter, then you cant see anything i post on my twt

#

And if you dont have ur age setting to 18+ then u also cant see anything i post on twt

#

Well, genuinely your stupid asf for hiring people off their twitter

#

Also, you seen the name of my Twitter account, and you opened it

#

Use some common sense my dude

molten creek
#

Bro it's crazy to me

wise meadow
#

So, genuinely not my problem

molten creek
#

Crazy statement

wise meadow
#

If you have a problem tho, feel free to dm me

molten creek
#

Low IQ statement

wise meadow
#

Rather than continuing this stupid asf convo in the public chat that we're supposed to use for coding discussions

molten creek
wise meadow
molten creek
#

Defo not for me I usually hire common sense

west copper
#

Is there anyone that can Make NVG and TVG system for Roblox specifically for auto morph stuff ?

wise meadow
#

The Pacific is an Ocean

west copper
molten creek
#

Did he acc correct your grammar

#

Crazy

wise meadow
#

😭

lean ocean
#

there's children in this discord server

wise meadow
#

2 blocked messages

somber vault
wise meadow
somber vault
#

all i said was erhmm

#

😐

#

is switching from lua to roblox TS worth it?

wise meadow
somber vault
#

roblox language is lua

somber vault
#

and i want to understand why

vagrant shoal
somber vault
#

is it necessary to learn javascript before typescript

wise meadow
night jasper
#

can someone help me with a chat system message?

wise meadow
#

Just use luau

wise meadow
night jasper
# wise meadow Whats up?

im making a game. and i wanna make it so when someone rolls a rare rune. it shows in chat. but im not sure how

lean ocean
#

😢

night jasper
#
local function RollCPRunes(plr)
    if plr.leaderstats.CP.Value >= RuneCost then
        plr.leaderstats.CP.Value -= RuneCost

        local RunesFolder = plr:FindFirstChild("Runes")
        local RuneRolls = plr.leaderstats:FindFirstChild("RuneRolls")
        local RuneBulk = plr.leaderstats:FindFirstChild("RuneBulk")
        local RuneDupe = plr.leaderstats:FindFirstChild("RuneDupe")

        if not (RunesFolder and RuneRolls and RuneBulk and RuneDupe) then return end

        for i = 1, RuneBulk.Value do
            local SelectedRune = LuckFunctions.rollRarity(plr, Runes["CP-Runes"])
            RuneRolls.Value += 1

            if typeof(SelectedRune) == "string" and RunesFolder:FindFirstChild(SelectedRune) then
                local runeData = Runes["CP-Runes"][SelectedRune]

                if runeData.Chance < 5 then
                    RunesFolder[SelectedRune].Value += RuneDupe.Value
                else
                    RunesFolder[SelectedRune].Value += 1

                    local message = `[SERVER] WOW!! {playerName} Rolled A Rare Rune: {selectedRune} (1/{chance})`

                    StarterGui:SetCore("ChatMakeSystemMessage", {
                        Text = message,
                        Color = Color3.fromRGB(255, 200, 0),
                        Font = Enum.Font.SourceSansBold,
                        TextSize = 18
                    })
                    
                    end)
                end
            end
        end
    end
end
#

this what i got rn

wise meadow
# lean ocean this guy is stupid cause it literally violates the discord tos

nothing ive done has ever violated discord ToS, so respectfully leave me alone, been on discord since 2015, u probably dont even know the actual ToS, And again, Discord doesnt control anything that links to off platform things, such as the Connections, Discord isnt displaying anything that children shouldnt see, Twitter is, And my Twitter btw once again is set to where u have to be 18+ to see anything. Which means u have to be logged in and set ur age as that

lean ocean
wise meadow
night jasper
wise meadow
wise meadow
night jasper
wise meadow
night jasper
#

ty

night jasper
frank oar
#

can anyone help me with a roblox script

night jasper
frank oar
dusk fern
#

can anyone help me with my roblox clothing game? i'm having the following issue.
I bought a premade game, and the script was included. When i click on the avatar within roblox studio it all pops up fine
but when i check it in actual roblox it doesn't work, does anyone understand why or if there's something i'm missing to enable?

thick sluice
#

i learned how to code a UI
local TextButton = script.Parent
local TextLabel = script.Parent.Parent.TextLabel
local CloseButton = TextLabel.Close

local openedUi = false

TextLabel.Visible = false

TextButton.MouseButton1Click:Connect(function(clicked)
if openedUi == false then
TextLabel.Visible = true
openedUi = true
else
CloseButton.MouseButton1Click:Connect(function(Close)
TextLabel.Visible = false
openedUi = false
end)
end
end)

torn aurora
#

yall does this game have potential its obby but its endless.

pliant zealot
#

What is the current best way to learn lua from someone who has no coding experience?

pure owl
#

Yo any scripter wanna join a duo and create a new game? If so dm me!

solid fulcrum
#

guys i need help

#

local touchPart = game.Workspace.touchPart

local partIsTouched = false

touchPart.Touched:Connect(function(otherpart)
if partIsTouched == false then
partIsTouched = true
print(otherpart.Name)

    task.wait(1)
    partIsTouched = false
end

end)

if partIsTouched == true then
print("yakaboo")
end

#

so the last line, whenever i touch the part it does not print yakaboo

bleak glade
#

4 hour coding session yeah i need new hobbies

wise meadow
#

it use to be discord blue lmao

wise meadow
wise meadow
broken minnow
foggy burrow
#

broooooooo

#

im bored

#

anyone need a system or smthn ill program it for a few rbx

fallen cove
#

@buoyant totem

fading oxide
#

@buoyant totem

somber vault
#

@buoyant totem

bleak topaz
somber vault
#

how do I change a parts lookvector

bleak topaz
#

actually depends on what you're doing

#

but if you're checking 1 time you shouldnt be using a while loop

#

because that means you're checking every 0.1 seconds

#

not very efficient imo

#

you could use a wait before you check the condition

#

wait nvm that wouldnt work lol

cosmic olive
#

If you want, you can get any other vector though. You can use -Part.CFrame.LookVector (I think) to get the back-facing normal, and similar stuff for the 'UpVector' and (I think) 'RightVector'

somber vault
#

yeah it was a bad question I figured it out in like 10 seconds

cosmic olive
#

Lol no worries, I get confused with cframe stuff all the time

torn aurora
#

how does this updates gui look?

ancient raft
#

You need to enable some of them

lost pebble
bleak glade
lost pebble
#

Oh ok. That’s better

coarse notch
#

dodes anybody know a youtuber that makes scripting videos, like funny stuff and explains how it works?

pearl blaze
#

I have a module function that needs a player as argument to do stuff, inside this function it gets player data, inside module I'm connecting to PlayerAdded event to create and set data to player, and on PlayerRemove I'm deleting this data. The problem happens when trying to use this module inside function that is connected on PlayerAdded, because roblox for some reason firing last connected events first, the function starts before any data for player is created. Is there any way to change the order of events firing?

#
-- module
local playerData = {}

game.Players.PlayerAdded:Connect(function(player)
  playerData[player] = {Somedata = 5}
  -- we're setting player data
end)

return function(player)
  playerData[player].Somedata += 1
  -- we're using player data somehow
end
-- script that uses this module
local module = require(module) -- we're requiring the module above

game.Players.PlayerAdded:Connect(function(player)
  module(player) -- it will probably make an error
end)
spring token
pearl blaze
#

This is just an example.

#

Showing that I am changing and working with this data.

spring token
#

thats unnecessary and confusing to have multiple playeraddeds in different places to all handle one thing. just make functions within the module that create and handle data and then call those when the player joins

#

that way you get to actually set the order of function calls

pearl blaze
#

That would be confusing, module is separate module that does stuff, I want to make it usable in all cases, even on player joining.

#

Ofc it would be easy to fit everything in one script without creating everything else, but that's not what we're doing here.

#

I need the solution, not the alternatives.

spring token
pearl blaze
#

That does nothing...

spring token
#

that does exactly what your script does bro

#

but instead its in one script and doesnt have bad practice

pearl blaze
#

I can't call PlayerAdded on every PlayerAdded event.

#

Data would just be reborn that would break stuff.

spring token
#

do you know how datastores work

#

😭

zenith mason
#

datastores are easy. its just POST data with key,value and GET data with key

#

the end

pearl blaze
#

Listen if you don't have any alternative solution to fix a MODULE, without complicating the scripts that use that module, please don't respond.

spring token
#

I JUST GAVE YOU THE MODULE

zenith mason
#

give me a summary of what this is about

#

im confused lol

pearl blaze
#

Dunno maybe you know if there's any methods

spring token
# zenith mason give me a summary of what this is about

he wants to control the firing order of playeradded events within his scripts so that he can run one playeradded within the datastore module first to create data, and then call another playeradded after the one within the datastore runs to call the function that the datastore module returns

#

its so stupid

zenith mason
#

you're trying to save data on a fucking module?!?!?!

pearl blaze
spring token
#

and i told him make one playeradded event in the module and call it when the player joins in an actual script and dude told me im duplicating data

#

this channel is cooked

pearl blaze
#

You're literally confusing people trying to help me.

#

@zenith mason Just ignore him and try to keep focus on my messages, he makes everything confusing.

spring token
#

holy shit cryingdead

zenith mason
#

Let's see

I have a module function that needs a player as argument to do stuff, inside this function it gets player data, inside module I'm connecting to PlayerAdded event to create and set data to player, and on PlayerRemove I'm deleting this data. The problem happens when trying to use this module inside function that is connected on PlayerAdded, because roblox for some reason firing last connected events first, the function starts before any data for player is created. Is there any way to change the order of events firing?

can you elaborate more on what you mean by

because roblox for some reason firing last connected events first, the function starts before any data for player is created

pearl blaze
#

If you connect many functions to the same event, the last connected function will fire first.

#
game.Players.PlayerAdded:Connect(function(player)
    print('1')
end)

game.Players.PlayerAdded:Connect(function(player)
    print('2')
end)
#

So here it will print 2 first and then 1 if player joins.

#

And module connects to PlayerAdded first, thus it being fired last.

zenith mason
#

First of all, having two of the same RBXEvents in the same script is a really bad idea

pearl blaze
#

It's not same script.

#

It's separate module that can be used anywhere.

spring token
pearl blaze
#

Using module inside PlayerAdded is just an edge case I wanna fix if possible.

spring token
#

i told him to put the original event as a function isntead of a connection and call it on playeradded

#

he tells me its overcomplicating

#

do you see how stupid this is

pearl blaze
#

I'm not sure if this would ever happen? I don't know how I will use this module in this future, there is possible cases where I use this module inside PlayerAdded.

#

I need to somehow create a table inside this module that has player index so when someone using this module while passing player arugment, I can get it's data, but using it inside PlayerAdded is an edge case that breaks stuff.

zenith mason
#

module scripts are meant to simply be a collection of coorelated scripts

#

using events in them is unwise

pearl blaze
#

Why not? This is like a service type of thing.

#

Really comfortable.

lofty plinth
#

How does it break stuff

pearl blaze
#

Read the first message to understand what's going on.

lofty plinth
#

Yield it

spring token
#

bad practice

lofty plinth
#

This whole convo is eh

pearl blaze
#

Lemme try an example

zenith mason
# pearl blaze Why not? This is like a service type of thing.

i dont make the rules. Think of it like this:

ModuleScript is just a piece of code. Say the code it has is CodeX

You use a local script with a code. Say the code it has is CodeY

When you Require Module script, think of it as "merging both scripts to create a new script"

For instance:

ModuleScript
print("Hello")
LocalScript
print("I am local!")

ModuleScript + LocalScript(Require ModuleScript)

print("I am local!")```
pearl blaze
# lofty plinth Yield it
-- module
local playerData = {}
local waitingForPlayerData = {}

game.Players.PlayerAdded:Connect(function(player)
    playerData[player] = {Somedata = 5}
    
    if waitingForPlayerData[player] then
        task.spawn(waitingForPlayerData[player])
        waitingForPlayerData[player] = nil
    end
end)

return function(player)
    
    if not playerData[player] then
        waitingForPlayerData[player] = coroutine.running()
    end
    
    playerData[player].Somedata += 1
    -- we're using player data somehow
end

You mean like this?

zenith mason
#

Ok

pearl blaze
zenith mason
#

Here's the jist,
When you require a module script, think that the script requiring the module and the module itself is merging

#

^ this

pearl blaze
#

This example has ONE script using this module.

#

But imagine there's MANY using this module.

#

MANY MANY, This module is basic framework of my game.

spring token
#

thats why you fill a module with... functions????

#

like i showed you????

-- module
local module = {}

module.PlayerAdded = function(player)
-- call when player joins within a script and create a player data table
end

module.AddToData = function(player, amount)
-- increment player data
end

return module
lofty plinth
#

If u use modules properly that never is an issue

zenith mason
#

Case One @pearl blaze

zenith mason
pearl blaze
#

Why are you teaching me how module scripts work?

spring token
pearl blaze
#

I know how they work, there's a problem that you seem talk about but not give actual solution.

spring token
zenith mason
#

just learn from mistakes yeah 👍

pearl blaze
#

What mistakes there's still a problem you didn't fixed?

zenith mason
#

when you call a module script it will not run an event. it is simply meant to be REQUIRED by local or server

pearl blaze
#

Except distopian he actually gave a viable solution.

zenith mason
#

ok

lofty plinth
#

A horrible solution

spring token
#

bro ive given you a solution twice now

pearl blaze
zenith mason
#

the solution this:
Dont put events in your module script

spring token
#

you are probably the worst beginner i have ever interacted with

lofty plinth
#

If u want to maintain whatever ur doing I'd move to modules

spring token
#

yk what ill spell literally every single function and script out for you

#

using YOUR code

#

give me 30 seconds

lofty plinth
#

Once u get 2 it you'll see the difference like night and day

pearl blaze
pearl blaze
zenith mason
#

A problem has many solutions, and often the seemingly less efficient solution is more preferred to avoid dogshit complexity

pearl blaze
#

This problem adds dogshit complexity and gives no solution.

#

How about that?

spring token
#
-- module script
local module = {}
local playerData = {}
module.PlayerAdded = function(player)
    playerData[player] = { Somedata = 5 }
end

module.AddToData = function(player, amount)
    playerData[player].Somedata += 1
end

return module

-- server script
local module = require(pathToModule)

game.Players.PlayerAdded:Connect(function(player)
  module.PlayerAdded(player) -- create table for player
  module.AddToData(player, 1) -- add to player data
end)
#

that is literally the solution to your problem

#

and you can call that same module in another script

#

and itll work the exact same

pearl blaze
spring token
#

then you... dont call playeradded

pearl blaze
#

And again later connected playeradded functions fire first, so playeradded will be last, and that would give you an error.

#

My problem is to make this module viable to call inside PlayerAdded
"Don't call it in PlayerAdded"

#

You're literally saying don't try to find a solution and just don't do it.

#

Stop flooding the chat.

spring token
#

yea we are saying dont do it

#

and youre not listening

pearl blaze
#

Nope, some guy actually gave a solution that fixes a problem.

zenith mason
#

he is trying to help you understand by sneding you a script, what of that is considered flooding

spring token
#

YEA THAT GUY WAS ME BRO

#

youre gonna make me start drinking prematurely

lofty plinth
#

A horrible solution

spring token
pearl blaze
#

The only one solution can't be horrible.

zenith mason
#

brother that's a dogshit solution

pearl blaze
#

Have anything better?

spring token
pearl blaze
#

Then shut it.

zenith mason
#

try better alternatives!??!?!?!?!

spring token
#

I HAVE SAID IT 6 TIMES

#

this guy gotta be ragebaiting me bro

lofty plinth
#

Ur 2 stubborn to actually go for the alternative solution because u think you can only do it 1 way

zenith mason
#

There are soo many ways to approach this

pearl blaze
#

Like what? Keeping the problem and erroring my game?

spring token
#

im actually so mad

zenith mason
#

And yet you continue to pretend there's not

spring token
zenith mason
#

are u delusional

pearl blaze
#

Give me an example that won't error.

spring token
#

that solves everyones problem

spring token
lofty plinth
#

If u dont want actual help just leave

silver verge
spring token
#

W ragebait man you win

lofty plinth
#

Ur refusing all means of people actually helping u

spring token
#

im not falling for ts anymore

pearl blaze
#

Thanks for help, my problem still stands except a solution you call dogshit.

lofty plinth
#

U have a solution u refuse to acknowledge it

silver verge
#

what is your problem

spring token
#

dude blocks me, refuses to use my solution, claims the problem still stands

lofty plinth
#

Thats on u

spring token
#

this server is cooked

#

i literally wrote both scripts

silver verge
#

gotta see ts

spring token
#

now obviously they are still dogshit

#

because i used his shitty ass code

#

BUT IT WORKS

pearl blaze
lofty plinth
#

Alternative solutions where given

silver verge
lofty plinth
#

Better practices where given

pearl blaze
#

Depends what part of code you've seen, but if you wanna help me feel free to check the problem.

spring token
#

has more experience than me with modules

pearl blaze
spring token
#

such a miserable existence droidsobpixel

pearl blaze
#

This becomes a real problem, don't yall have anything better to do?

lofty plinth
pearl blaze
#

@silver verge the only one currently trying to go into the problem, and it seems I'm not listening to your "solutions", so go, I already explain why it's not working, you're ignoring it.

spring token
pearl blaze
spring token
silver verge
#

i use lyra these issues don't apply to me

zenith mason
#
-- getPlayerCoins [MODULE]
getCoinsOfPlayer = require(script.Parent:WaitForChild("getPlayerCoins"))

game.Players.PlayerAdded:Connect(function(plr)
    print(`Print {plr.Name} has {getCoinsOfPlayer(plr.Name)}`)
end)

-- coins [Server]
getCoinsOfPlayer = require(script.Parent:WaitForChild("getPlayerCoins"))

game.Players.PlayerAdded:Connect(function(plr)
    print(`Print {plr.Name} has {getCoinsOfPlayer(plr.Name)}`)
end)```

@pearl blaze
silver verge
#

if you needed this for states you can request the state with a function and handle the case where it returns nil

spring token
zenith mason
pearl blaze
#

There's a bunch of data and a bunch of functions.

silver verge
#

assume it can return nil

pearl blaze
#

Wait...

silver verge
#

works done gg next

pearl blaze
#

So you mean like

somber vault
#

How do I get a PlaceId of a place that isn't the starter place?

#

print(game.PlaceId) wont work for some reason

silver verge
silver verge
somber vault
#

This is me spamming enter.

pearl blaze
silver verge
somber vault
#
    print("Attempting to load player data from DataStore for:", player.Name)
    print(game.PlaceId)

here's it nested underneath the print you see above. Also doesn't work.

somber vault
rotund bay
#

my script says that the ID is sanitized but it’s under the same group

#

its in replicated storage under a folder

silver verge
#

ok get it from asset manager > places then

somber vault
#

I'm a nerd. It's because I was still filtering my search

#

🏃‍♂️

#

Sorry

silver verge
#

💔

somber vault
#

I healed it for you

silver verge
#

shouldve used ❤️‍🩹

somber vault
#

🚑

#

I'm omw

pearl blaze
#
-- module
local playerData = {}
local waitingForPlayerData = {}

local function getData(player)
    if not playerData[player] then
        playerData[player] = {Somedata = 5}
    end
    
    return playerData[player]
end

return function(player)
    local data = getData(player)
    
    playerData[player].Somedata += 1
    -- we're using player data somehow
end

@silver verge thanks you, this is literally what I wanted.

somber vault
pearl blaze
#

Finally someone who actually started talking and giving optimized solutions.

somber vault
#

💝

somber vault
#

😦

pearl blaze
#

Yeah there's a problem that most people talk without giving any solutions.

#

It's happening like 50/50.

zenith mason
spring token
pearl blaze
#

I can't stop them from talking and it's a problem because they're flooding the chat.

zenith mason
#

how unsurprising

pearl blaze
#

My problem like goes above all useless messages from people that don't have anything better to do.

somber vault
lofty plinth
#

Average user asking for help 😿

astral spire
#

anybody got some cool script editor themes ive grown bored of the default

zenith mason
#

like holy shit bro i've been telling you do that that and you say it's ignorning the problem

pearl blaze
#

You didn't told me to create a data every time I'm using a function

somber vault
spring token
#

THATS WHAT MY SCRIPT DOES

#

THATS WHAT HIS DOES

zenith mason
#

There's a difference between completely writing your script and fixing your problem brother

pearl blaze
#

Alright this is useless.

spring token
#

YOU HAVE TO BE SPECIAL

pearl blaze
#

Next time if someone ignores, don't wants your help just go with it.

spring token
pearl blaze
#

Bet someone better will come and give a solution.

silver verge
#

wclxb saved the day

zenith mason
#

w wclxb move

spring token
#

fuck you respectfully

lofty plinth
spring token
silver verge
zenith mason
#

well anyone, does anyone know any fun stuff i can do with switching model mechanic

lofty plinth
spring token
#

build fast ship fast baby!

pearl blaze
#

He's not working on any game currently I can bet 100%

silver verge
#

i had the same idea to reskin it as potions

zenith mason
silver verge
#

dont think it'd work though

spring token
silver verge
#

since theres no visual progression unlike plants

pearl blaze
#

"master coders" like those who read the complex code without having any experience

spring token
#

and im also probably younger than you

pearl blaze
#

the annoying part is spamming again, I can't stop them from flooding the chat

spring token
#

please check my roblox profile 💔

silver verge
#

js block them then bro 😭

zenith mason
spring token
#

innovation am i right

ruby cipher
zenith mason
silver verge
zenith mason
#

no, i'm literally just switching between two different models

silver verge
#

won't it look too similar and boring

zenith mason
spring token
ruby cipher
#

oh are u changing network ownership just

zenith mason
#

add boss fights to that

silver verge
zenith mason
silver verge
#

rooting for you since i had the same concept 🫡

spring token
silver verge
#

ic

zenith mason
#

whenever a player joins, two models are created and player can switch between them

#

same player, just different models

lofty plinth
zenith mason
#

no netowkr ownership changes

lofty plinth
#

Camera cframe*

vagrant shoal
#

Bro I did a commission for a guy wanting event analytics this guy does not know how funnel events work

zenith mason
#

that's why he comm'd you

vagrant shoal
#

At least know what you’re doing before commissioning a scripter

vagrant shoal
spring token
zenith mason
#

is that not why he hired you, to do it for him, or am i stupid

vagrant shoal
lofty plinth
zenith mason
zenith mason
#

:p

vagrant shoal
zenith mason
vagrant shoal
#

But it was just surprising because I had to show him how to access it on create

#

But yeah it all went well

spring token
#

sometimes you gotta do that

vagrant shoal
#

Got it

zenith mason
#

lol make sure you don't do everyone someone says, they might just be trying to steal your cookie or something

#

be cautious

#

👍

spring token
#

but the best part is eventually when roblox breaks shit and he has no clue how to fix it boom you have another commission

lofty plinth
#

Either store in a table connected to the model itself or dump an attribute on that thing is probs the easiest way

vagrant shoal
#

I charged $50 is that too low

zenith mason
#

not exactly

vagrant shoal
#

For 2 hours of script work

zenith mason
#

That's a steal

spring token
#

you made more than minimum wage

zenith mason
#

but depends honestly

lofty plinth
#

Id say that's solid

spring token
#

id say thats pretty solid

vagrant shoal
#

Alright thanks

zenith mason
#

you got your comms from here?

vagrant shoal
#

Yeah

#

I’ve been solo for years I just recently started comms

#

Needed funds for my big project and thought I could get some extra money on the side

#

I’m in high school I started when I was 9

zenith mason
#

use what you did for commns for your portfolio and you should be getting there 👍

spring token
vagrant shoal
zenith mason
#

i've been doing lua for only 4 years now 😔

vagrant shoal
zenith mason
#

post a job

spring token
vagrant shoal
#

Wow that’s a lot

spring token
#

small world

vagrant shoal
#

Yeah

spring token
zenith mason
#

LINE TO HEAVENLY GATES SIMULATOR!!!!!!!!!!!!!

spring token
vagrant shoal
#

I’ve made about $200 total so far

spring token
#

thats dope bro

vagrant shoal
#

In 4 days

spring token
#

hell yea

vagrant shoal
#

It’s going good

spring token
#

how long you been programming for

vagrant shoal
#

Since I was watching Alvin blox when I was 9

#

I’m now almost 16

#

I’m a sophomore

spring token
#

oh nice i started at 9 too

#

and now im 17

zenith mason
#

im 20 💀

spring token
#

alright unc

vagrant shoal
#

Early bird gets the worm bro

zenith mason
#

and made a WHOPPING 3k robux in 6 months lmfao

spring token
#

game is game

#

i made 0 money until i was 13 LOL

#

was doing comms for tha free

vagrant shoal
#

This is my first Roblox money lol

#

At 16

zenith mason
#

4 years of training 💪

spring token
#

trust me

zenith mason
#

man i know how comms work but i never seem to be able to make my own

vagrant shoal
zenith mason
#

advices?

spring token
#

you gotta get connections to big developers

zenith mason
#

yes sure i'll do that while i have yet to have a portfolio

spring token
#

i guarantee you a person who has 1 game contributed but it has 5k active and 100m visits will get a comm before someone with 20 games contributed that all have under 100 players does

#

everyone cares more about numbers than skill now its crazy

young crescent
zenith mason
#

that's easier said than done. to begin with, i'd have to find said big developer

spring token
#

i was dming developers on the daily asking them to hire me LOL

zenith mason
#

and that actually worked?

spring token
#

yea i eventually got someone from this server to give me a chance, i got the game to 17k concurrent and then got hired for a different game later down the road

#

and the original game that i got to 17k concurrent got me verified and it was bbq chicken from there TrollSus

zenith mason
#

hmm

#

i'll try spamming dms then TrollSus

#

i've spent the past week build scripts for a portfolio

silver verge
#

just dm sword 🙏 😭

#

check twitter

lofty plinth
#

Dont be afraid of being annoying (unless u are moonhuh)

spring token
silver verge
spring token
#
  • ex employee
silver verge
#

WYM BRO PLAYCORE IS TUFF!!!!

spring token
#

bro you see my screenshot

silver verge
#

yea ik

spring token
#

all those games have <100 players

silver verge
#

im well versed in the playcore lore

spring token
#

and when i joined some of them have 600+

zenith mason
silver verge
#

my friend is the one who got him verified

spring token
#

i was the ONLY programmer on like 6 GAMES droidsobpixel

silver verge
#

💔

spring token
#

AND MADE LIKE $300 ☠️

silver verge
#

wicked work

spring token
#

terrible waste of time

vagrant shoal
#

That’s a scam

spring token
#

dude thinks he can just buy games and get rich

silver verge
#

he aint axel or dobig

#

he wanted to be

spring token
#

not that i condone it but i do

vagrant shoal
#

Bet

silver verge
#

idk where hes getting his money from now

spring token
#

dont ever take % from him tho

vagrant shoal
#

Yeah I never do percentage

spring token
silver verge
#

makes sense

vagrant shoal
silver verge
#

only do % on games with an active playerbase

zenith mason
#

anyone wanna recommend me some scripting channelges i can gather extra scripting xp from

zenith mason
#

💪

silver verge
#

dont take a gamble unless its your own project

silver verge
#

buffers are fun

zenith mason
#

wait()

#

???????

silver verge
#

💔

spring token
#

i use buffers for my datastores now that they added them

zenith mason
#

ah

spring token
#

i love c++ its the closest thing lua has now

silver verge
#

i dont wanna use them for datastores since player data dynamically changes

#

as the game updates

spring token
#

speaking of c++ does anyone want some old cs cheats i made

silver verge
#

and i dont wanna do migrations

#

lyra is good enough for me

zenith mason
spring token
vagrant shoal
silver verge
#

none of my games would benefit from compressed data

vagrant shoal
#

Buffers are cool

silver verge
#

never been a bottleneck

#

i wrote a networking library with bit compression though

#

so a boolean is a bit instead of a byte

spring token
# vagrant shoal This is a good idea I should start doing this too

only if you want a simple script to update a "table buffer" to look like this


module.Addingredients = function(player: Player, plantId: number, amount: number): (boolean, string | nil)
  local data = memory[player.UserId]

  local temp = buffer.create(110)
  local ingredients = module.Getingredients(player)

  local existing = nil
  for idx, ingredient in ipairs(ingredients) do
    if (ingredient.id == plantId) then
      existing = idx
      break
    end
  end

  if (existing) then
    ingredients[existing].quantity += amount
  else
    if (#ingredients >= 20) then
      return false, "max"
    end

    table.insert(ingredients, {
      ["id"] = plantId,
      ["name"] = module.INGREDIENT_NAMES[plantId] or "Unknown",
      ["quantity"] = amount
    })
  end

  buffer.writeu8(temp, 0, #ingredients)

  for idx, ingredient in ipairs(ingredients) do
    local offset = 1 + (idx-1) * 5
    buffer.writeu8(temp, offset, ingredient.id)
    buffer.writeu32(temp, (offset + 1), ingredient.quantity)
  end

  core.Write(data, 2, function(_buffer, address, data)
    buffer.copy(_buffer, address, data, 0, 110)
  end, temp)

  return true
end
silver verge
#

why r we using ipairs gng

#

✌️

spring token
#

because of the offset...

silver verge
#

arrays are looped over in index order by default

vagrant shoal
pine chasm
spring token
silver verge
#

instant dataloss

vagrant shoal
zenith mason
#

yo dudes any advice on how to simply get comms on the regular, apart from mass dms which i will do but after i build a stronger portfolio

pine chasm
#

AI can write this if I can't

spring token
silver verge
#

that works aswell

zenith mason
#

how regular would that be

vagrant shoal
spring token
zenith mason
vagrant shoal
spring token
zenith mason
silver verge
#

couldve kept you on the team though

pine chasm
spring token
vagrant shoal
silver verge
#

wtf

#

ye thats fucked up

vagrant shoal
spring token
#

playcore effect

silver verge
#

😭

vagrant shoal
#

Rn I’m working on a fps demo to showcase my scripting skills and apply for the luau programmer role

zenith mason
#

how long after you posted your portfolio did u get any jobs

spring token
#

a github profile is slightly pointless if you dont have any open source or public code

#

and youre not using it for a job obv

vagrant shoal
vagrant shoal
young crescent
vagrant shoal
spring token
vagrant shoal
#

But I also sent dms to people from #scripter-hiring where the commissions were within my capacity

zenith mason
spring token
young crescent
#

roblox game companies be killing everything they touch

zenith mason
#

moreover did u mostly seek out for jobs in #scripter-hiring or did people come to u

vagrant shoal
#

It’s been 4 days now I made $200

young crescent
spring token
vagrant shoal
vagrant shoal
zenith mason
#

this was recent

#

damn

spring token
#

i hate roblox

young crescent
# spring token

why u ending up in this situation in the first place stop working for rich skids

spring token
young crescent
#

comms are a scam u just dont know it yet

vagrant shoal
odd nacelle
#

anyone a good scripter wants to be payed 4k robux to fix scripts that are not working

spring token
young crescent
spring token
#

because i make a lot of money off my roblox job with 0 security

young crescent
#

how much is a lot of money considering he fired u over getting sick

vagrant shoal
#

British guy

spring token
vagrant shoal
young crescent
vagrant shoal
#

Wait what was the daily revenue for fiak

#

While you were still on the team

spring token
spring token
young crescent
zenith mason
#

fiak as in Fight in a Kindergarten?

spring token
young crescent
vagrant shoal
pine chasm
young crescent
spring token
#

because all the roblox games are programmed by minors

young crescent
#

usually a kid from a rich family wants to make a game or sum and then he starts hiring a bunch of ppl and fires them over the smallest thing

pine chasm
#

If you truly deliver quality a client will never think of firing you

young crescent
pine chasm
#

I dished

somber vault
spring token
vagrant shoal
spring token
#

damn its really 2 am i got school in 6 hours

vagrant shoal
#

Damn I’m on break

spring token
vagrant shoal
#

That’s the only reason I have time to do all this lol

#

AP exams in 3 weeks

#

And then finals in June

pine chasm
spring token
#

i have hella track practice, a ton of homework, exams and state meets coming up

#

im cooked

#

morl gonna fire me 💔

pine chasm
#

Complaining- suffered aura loss

vagrant shoal
#

I ran indoor track

spring token
vagrant shoal
#

I’m thinking of skipping workouts my body needs rest 💔

spring token
vagrant shoal
spring token
tulip panther
#

Anyone knows how can I make server to sell my models

vagrant shoal
#

I was a lineman on JV this year I bulked up from 150 to 175 my goal is 180 by football season so I can be a varsity tight end

pine chasm
vagrant shoal
#

Never got better

spring token
vagrant shoal
#

I basically did every sport until I found football and lax

pine chasm
#

I did rugby I was so ass

vagrant shoal
spring token
#

i'm a fast shifty midget who is 5'5 😭

vagrant shoal
spring token
vagrant shoal
vagrant shoal
spring token
vagrant shoal
vagrant shoal
spring token
#

ironically enough i had the most receiving yards and touchdowns on my team 😭

spring token
#

but no aura i get to in n out after the game and the huzz all looking down at me 💔🥀

vagrant shoal
#

No gay shit

spring token
#

i just get thrown

#

😂

vagrant shoal
#

lol

#

I made so much progress in the weight room

#

Bench press was 150 in September

#

Got all the way to 225

#

And squat 315 -> 405

spring token
#

that's dubs i'm small but i can lift
245 bench
220 clean
450 squat
560 dead

#

they call me endermite 😭

#

(i'm black)

vagrant shoal
#

God damn bro

#

At 140 lbs is freaking crazy

worn pilot
#

Is table.getn() deprecated

vagrant shoal
#

I can barely clean 165 but that’s js cause I hardly do it

#

But my deadlift is 450

vagrant shoal
#

For example if you had a table stored in a variable called “array” you would get the number of items in the table by using #array

split pilot
#

does anyone know how to code in python

zenith mason
#

yeah

#

wsp

#

@split pilot

split pilot
#

can you fix py?

#

complex

zenith mason
#

depends. send me your code

split pilot
#

k

somber vault
#

Is settings something roblox already has assigned to something? Making it not possible to assign values to settings? Or am I wrong about that

pine chasm
somber vault
#

But that explains it

elfin blaze
#

is it possible to tween the color of particles

somber vault
#

Is there anyone that's able to help me learn coding (Lua)? Kind of like tutoring except volunteering.

#

If anyones keen then hmu

vagrant shoal
#

Bro

#

It’s 2025

#

The internet is free