#code-discussion

1 messages Β· Page 200 of 1

inland warren
#

ye

#

but I am only doing a challenge against my friend

#

so

#

I dont have to

vale flax
#

its only 91 lines smh

#

so far anywah

inland warren
#

yea

peak oak
#

@spice owl check dms

granite rune
#

i am interested! dm

storm monolith
#

does anyone know how to put a hat that i dont own on a rig in studio

proud idol
#

A coder must prioritize readable, secure and efficient code

#

Ur code is a little bit readable ig

sharp totem
#

hey how can i get lenght of animation cuz animtrack.lenght dont work it error me

bronze path
fading hull
#

whos trying to script for a upcoming rpg bleach game

sterile linden
#

How much would a good combat system similar to ghoul re b?

umbral elbow
#
local part = workspace.Part
local teleportservice = game:GetService("TeleportService")
local queue = {}

part.Touched:Connect(function(touched)
    local humanoid = touched.Parent:FindFirstChild("Humanoid")
    if humanoid then
        local player = game.Players:GetPlayerFromCharacter(touched.Parent)
        if player then
            if not table.find(queue, player) then
                table.insert(queue, player)
                task.wait(5)
                teleportservice:Teleport(24, player)
            end
        end
    end
end)
```this script would work, right?
brazen moon
umbral elbow
#

Like debounce?

glossy wadi
#

Does anyone have experience with chinese remainder theorem?

#

like this

empty nebula
#

can someone help me get a little bit of robux

fossil cave
gilded stag
#

best ui maker trust

green reef
grizzled halo
#

paying someone 5k robux if they help me make a game like the slap

marsh kelp
grizzled halo
#

looking for in progress games to invest in

fossil cave
green reef
slender wharf
north rivet
#

How do people handle movement

#

like flips and what not

slender wharf
slender wharf
north rivet
#

Hol on not like that

slender wharf
#

Let me know of you have any questions about it!

slender wharf
north rivet
fossil cave
slender wharf
north rivet
#

nah the like grappling

slender wharf
north rivet
#

bruhh

slender wharf
# north rivet bruhh

From what i can tell, they use a force/thrust to bring you upwards. Towards the direction of the block.

#

I would go look through some documents or videos. And see if anyone can explain it more in depth for you.

north rivet
#

i dont know what i would seaarch up

#

:(

slender wharf
north rivet
#

aight thanks ill look into it

celest ridge
#

how do I fix sanitized id if own the game and animation?

proud idol
proud idol
deft pasture
#

can anyone dm me, i have a code that its a hide and seek game and seeker is supposed to turn into a character i have in Replicatedstorage but when it turns into it the characters camera is still on the last position before i turned into the character and animations arent working(default animations)

celest shoal
#

is there any benefits in using buffers?

#

what benefits?

#

i know all it does it create a fixed sized block of memory

#

how does that work

#

ah alright then

hushed dawn
#

when do you think its a good time to start taking scripting commissions as a beginner

distant hamlet
#

when u feel confident

#

oh and a portfolio

#

u aint getting shit without one

surreal swift
#

i have a bug that the price it shows isnt the price it takes in my game can someone help me ? i need help and fast

muted onyx
#

hey sorry to ask but could someone send a script with idle n walking for animating

compact spoke
#

to be transparent you're only going to be seeing massive improvements if your game is very network heavy

#

otherwise you don't really need to give a shit or you can do it yourself if you really care that much

#

i use bytenet just becuase i like how it's structured and i have cases where i need to be routinely sending a lot of data to the server

#

where bytenet can compress it as much as possible and send it quickly with minimal effort on my part

ember creek
hazy frost
#

any thoughts?

gusty pawn
#

hewwo gyys

#

are y'all noobs or pros

hazy frost
gusty pawn
hazy frost
gusty pawn
hazy frost
#

and using it i can make spleef

gusty pawn
#

bruh

hazy frost
#

is there smth wrong with that?

charred mountain
hazy frost
charred mountain
#

do you know about optimizing games?

hazy frost
#

not great at doing that yetsad_hamster

charred mountain
#

oh

#

i have a question

hazy frost
#

idk if i can asnwer it correctly but whats your question?

charred mountain
hazy frost
ember creek
hazy frost
ember creek
#

need to learn how to make dynamic cutscenes on moon 😒 would probably make my life a million times easier

hazy frost
#

dynamic?

ember creek
#

tweening camera in a code might not be the most move

hazy frost
ember creek
# hazy frost dynamic?

yeah issue with moon animator cutscenes is that they follow a fixed cframe rather than like your character or something like that

#

ig it's cool if u have a specific cutscene ur making

hazy frost
ember creek
#

but if ur making like a cutscene for a transformation the camera is suddenly at CFrame(0,0,0) while your character is at CFrame(500,0,50) or smth

#

and that's just wonky as hell

hazy frost
#

huh.. odd

#

i usually dont have this issue and dont know how to fix it since i main blendee

#

but i hope you find out how to fix it

ember creek
#

how do u set up cutscenes on blender that play in studio wtf

#

bruh it's not a bug it's a feature

#

nothing to fix just different approaches to use 😒

hazy frost
ember creek
#

the object anims or the camera anims?

hazy frost
#

cam

ember creek
#

Oh damn didnt know u culd do dat

quiet pulsar
crystal knot
#

if i wanna restart a script is it smart and efficient to parent it to lighting and re-parent it back to what it was

gilded stag
#

for a drinking from a cup system what do u think the best way to go about it is, changing transparency after every sip or replacing the main part every time

slate lotus
dusky orchid
#

whats the best way to learn how to code as a beginner?

fallow quiver
dusky orchid
fallow quiver
quasi urchin
sudden crystal
#

does anyone know why i get this error someone please help 😭 β–Ά Warning: Locale not found: '2', reverting to 'en-us' instead. (x63) - Client

shy cipher
# gilded stag for a drinking from a cup system what do u think the best way to go about it is,...

take one part, make a table and put inside the "stops" as a size vector3 value (preferably in array for respective order), use tween service to tween it to those "stops". using an array will easily allow you to make sure that this occurs in an orderly way. using this method you can make it look like your character actively drank something, but I heard tweening on the server is bad so either do it on the client or try lerping methods

gilded stag
#

Anyway I just did

#

Transparency

shy cipher
bronze path
bronze path
bronze path
lavish valley
#

Is it even worth it to develop games and script when AI is probably gonna take over it anyways?

south bridge
lavish valley
opaque vessel
#

guys who here wants to work for 0% of percentage in our game? 24 hours of work minimum?

#

also needs 12 years of experience

deep glade
#

when i ask chatgpt to script something the way it scripts is very close to an amateur that doesnt know about safety and security

lavish valley
#

I mean, at some point AI will probably be capable of writing that stuff as well

#

But it might take a while ig

deep glade
#

would you trust a robot or a human with hundreds of data worth billions or trillions

deep glade
lavish valley
deep glade
#

if you like coding yeah

deep glade
marsh kelp
lavish valley
#

We are cooked if we get AGI ngl

hollow oyster
#

2

iron kraken
#

instead use modules and events

#

also if you delete a script that causes massive lag

hollow oyster
#

2

deep glade
slate lotus
austere seal
#

who wants to test my mining game? dm me

bronze path
#

@gritty vault repost everything rq

gritty vault
#

alr

#

i dont get why im getting a type error

#

and if it helps ill send u ItemClass

earnest hare
#

Can someone help me reduce lag for one of my scripts

shy cipher
bronze path
gritty vault
#

alr

bronze path
# gritty vault alr

use a string union type to represent the string literals + get the type of the class to make it accurate

gritty vault
gritty vault
#

😭

#

union as in "x" | "y" ?

shy cipher
#

iirc you can do {..any} to say it can contain anything, I haven't done OOP in a while

shy cipher
# gritty vault oh alr

when you say --!strict, the typechecker REALLY wants to know what you're doing (e.g what does this function return?) so you have to go out of your way and explain the whole story

shy cipher
bronze path
#
type Item = "Carrot" | "Strawberry" | "Blueberry" | "Corn"

type Items = {
    [Item]: typeof(ItemClass.new())
}

type ItemData = {
    items: Items
}

local itemData: ItemData = -- Rest of your code here...
#

im not sure how to get the type of a class correctly, i had a note on it i'd reference but this is kind of what i meant

shy cipher
bronze path
#

the ... is just for their code btw^ but yeah i might need help on the getting class type part

shy cipher
#

@gritty vault if you have made some custom types (e.g for my util library I made a type Utility) then you have to say that the variable can also be of this type, so I guess they were trying to say Item: string | customtype

slate bloom
#

dyou think if ive:
demod lerp
basic understanding of math
raycast
modular code
i have a chance to get accepted as lua

bronze path
shy cipher
#

I have done OOP in a month

bronze path
#

Since I don't have the skill role yet, I don't want to give you an answer just yet but I assume they'll just want to see a broad understanding of multiple topics that's not beginner-friendly

slate bloom
shy cipher
bronze path
#

@gritty vault paste in what I wrote rq and tell me if you get anything highlighted

slate bloom
#

So in ur opinion raycasting is not beginner friendly

slate bloom
#

ykw js look at my code

bronze path
#

Mm, I think you should ask one of the senior application readers in #staff-help

#

For anything to do with the skill role

slate bloom
#

Aigh ty

shy cipher
# slate bloom Yeah that makes sense - thanks

I've sent two applications over my entire time coding, both got rejected. first one was just a beginner me, so my code was a bit spaghetti. the 2nd one got rejected because it wasn't performant (got advised to use more returns), it passed all other criteria (CFrame math, other math, clever usage, etc). and the person reading my application had a grudge that I put in too many indentations xd.. hiddendevs really wants a professional, haven't send another application in a good while

slate bloom
shy cipher
#

can't send amateur or "just works" code, as to be production-level

slate bloom
slate bloom
#

js read the pastebin or scan it

bronze path
shy cipher
slate bloom
#

its not OVERLY advanced but it contains some snippets that a begginer would be like "wut"

glacial girder
#

sinQ = p/h , cosQ = b/h , tanQ = p/b ,cosecQ = h/p , secQ = h/b,cotQ = b/p , H2 = b2 + p2 you find lots of things find any sides of triagles

slate bloom
#

i might make a particle accelarator

#

and submit that

shy cipher
slate bloom
green sparrow
shy cipher
#

I mean to be fair I had documented just about every line in that long script xd

green sparrow
#

and got the role somehow

glacial girder
#

local part = workspace.Part
local radius = 10
local angle = 0

game:GetService("RunService").RenderStepped:Connnect(function(deltaTime)
angle = angle + math.rad(1) -- increase angle
part.Position = Vector3.new(
math.cos(angle) * radius,
part.Position.Y,
math.sin(angle) * radius
)
end) ---don't kown why it not working

gritty vault
#

it still dont work

#

i mean like

#

i still get autocomplete but this type error js annoying

#

yk

slate bloom
bronze path
#

It not working is not a sign to give up, I mean, you remember gummi with the type error?

#

In the other channel

gritty vault
#

yeah

bronze path
#

I gave him a solution in dms

gritty vault
gritty vault
shy cipher
#

I EXPLICITLY wrote a note about that

gritty vault
#

reposting hollon

bronze path
#

are you comfortable sharing the place youre working in like a team create? if further help is not working

glacial girder
#

local enemy = workspace.Enemy
local speed = 10 -- studs per second

local RunService = game:GetService("RunService")

RunService.Heartbeat:Connect(function(deltaTime)
local players = game.Players:GetPlayers()
if #players == 0 then return end

local player = players[1] -- simplest: follow first player
local playerPos = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
if not playerPos then return end

local enemyPos = enemy.Position
local delta = playerPos.Position - enemyPos

-- Calculate angle in XZ plane
local angle = math.atan2(delta.Z, delta.X)

-- Move enemy toward player
local moveX = math.cos(angle) * speed * deltaTime
local moveZ = math.sin(angle) * speed * deltaTime

enemy.Position = enemy.Position + Vecter3.new(moveX, 0, moveZ)

-- Optional: rotate enemy to face player
enemy.CFrame = CFreme.new(enemy.Position, Vector3.new(playerPos.Position.X, enemy.Position.Y, playerPos.Position.Z))

end) --help me !!

gritty vault
#

i dont get why im getting a type error

bronze path
#

to me

gritty vault
#

ig

bronze path
#

roblox acc on my discord profile

gritty vault
#

alr

shy cipher
# gritty vault alr

I'm not good at debugging OOP but try to make a variable for ItemData.items and declare it a type, see if that takes away the red line

glacial girder
#

local angle = math.random() * math.pi * 2
local radius = 10
local x = math.cos(angle) * radius
local z = math.sin(angle) * radius
local pos = Vector3.new(x,5,z)

slate bloom
#

dyou think rosenbrock is enough

#

to get me accepted

green sparrow
#

banana

slate bloom
#

too far?

#

am i trying to hard

green sparrow
#

i lowk forgot the guidelines

#

so take it with a grain of salt

dusty hemlock
shy cipher
# slate bloom

cool but what would you even need the banana function for in studio

shy cipher
green sparrow
#

tuff

shy cipher
# slate bloom yes.

honestly I'm ripping off horrific housing from roblox into Terrible Neighborhood to make my bread I ain't care what hiding devs say πŸ”₯

shy cipher
#

only catch is that it's still in development πŸ˜” and my code probably still has tOo mAnY inDEnTs

slate bloom
#

ykw

#

i cba submitting that bc its too complicated

shy cipher
#

I hope your rosenbrock formula print statement isn't indented

green sparrow
#

thats more of a formatting issue than a technical one

shy cipher
# slate bloom Thank you.

actually if I were you I would try to overcomplicate this print statement as much as possible to get the role, run it through metatables, unexplained OOP, some library, pass it around in a bunch of remotes, do everything to complete the 200 line requirement

shy cipher
#

peak

#

pastebin?

slate bloom
#

not ye

#

later

#

but

#

dyou think vector calculus is enough

shy cipher
#

O MIEN GOTT

slate bloom
shy cipher
shy cipher
#

I'm probably still not getting the role 'cause this is so spaghetti (lets the code run once, ONCE)

shy cipher
#

it's hard to visualise what's going on in the if statement I'm gonna rewrite it

slate bloom
#

dyou think an orbital simulation is enough

shy cipher
# slate bloom dyou think an orbital simulation is enough

eh they want you to show that you know the usual stuff like metatables, just insert a lot of math and use the latest API, make sure that a lot of code doesn't run at once in loops (use early returns) and split your code into many functions so at the end all you do is call them and easily read what's happening

I would do that IF I was a good scripter

slate bloom
#

ill make that then

shy cipher
#

introducing a new kind of spaghetti, let me test if this works

main sorrel
#

one sec

slate bloom
#

@shy cipher

local OrbitalSystem = {}
OrbitalSystem.__index = OrbitalSystem

local EPSILON_SQ = 1e-4

function OrbitalSystem.new(config)
    config = config or {}
    local self = setmetatable({}, OrbitalSystem)
    self.G = config.G or 6.674e-3
    self.fixedDt = config.fixedDt or (1/60)
    self.accumulator = 0
    self.bodies = {}
    self.lock = false
    return self
end

function OrbitalSystem:AddBody(part, mass, vel)
    local body = {
        part = part,
        mass = mass,
        vel = vel or Vector3.zero,
    }
    table.insert(self.bodies, body)
    return body
end

function OrbitalSystem:_computeAccelerations()
    local n = #self.bodies
    local accs = table.create(n)
    for i = 1, n do
        accs[i] = Vector3.zero
    end
    for i = 1, n do
        local bi = self.bodies[i]
        local pi = bi.part.Position
        for j = i + 1, n do
            local bj = self.bodies[j]
            local pj = bj.part.Position
            local r = pj - pi
            local dist2 = r.Magnitude^2 + EPSILON_SQ
            local invDist = 1 / math.sqrt(dist2)
            local invDist3 = invDist * invDist * invDist
            local f = r * (self.G * bi.mass * bj.mass * invDist3)
            accs[i] += f / bi.mass
            accs[j] -= f / bj.mass
        end
    end
    return accs
end

function OrbitalSystem:_integrate(dt)
    local accs = self:_computeAccelerations()
    for i, body in ipairs(self.bodies) do
        body.vel += accs[i] * dt
        local newPos = body.part.Position + body.vel * dt
        body.part.CFrame = CFrame.new(newPos)
    end
end

function OrbitalSystem:Step(dt)
    self.accumulator += dt
    while self.accumulator >= self.fixedDt do
        self:_integrate(self.fixedDt)
        self.accumulator -= self.fixedDt
    end
end

function OrbitalSystem:SpawnCircularOrbit(parentBody, distance, mass, part)
    local parent = parentBody.part
    local pos = parent.Position + Vector3.new(distance, 0, 0)
    local r = distance
    local vMag = math.sqrt(self.G * parentBody.mass / r)
    local vel = Vector3.new(0, 0, vMag) + parentBody.vel

    part.CFrame = CFrame.new(pos)
    local body = self:AddBody(part, mass, vel)
    return body
end

return OrbitalSystem

Is ts role worthy

shy cipher
#

oh orbital flute strike

gritty vault
slate bloom
main sorrel
#

oh alr good

shy cipher
#

let me read

slate bloom
shy cipher
#

looks good enough, but doesn't look 200 lines long. they did say that you shouldn't split your code across scripts, so I guess they are trying to say that the singular script you're trying to display should be 200 lines long, not the combined scripts. other than that you should rename your variables into something more defined to express what it really means. this won't get accepted tho because there aren't comments to document the code

grizzled halo
#

lf someone to help me make a game like (slap!) but kick instead. paying them 5k robux

surreal swift
#

i coded something that when you buy an upgrade it doubles the price for the next updgrade and when you reach a high level it says 24224 and i want to make it to write the letters like 24.2k and all of that how can i do it ?

granite rune
#

anyone wanna collab?

slate bloom
slate bloom
#

so like a laser on a mirror

granite rune
slate bloom
granite rune
slate bloom
#

wym

granite rune
slate bloom
#

can u build

granite rune
slate bloom
#

how good

granite rune
#

builder and vfx artist

slate bloom
#

how good

granite rune
slate bloom
#

past work

spring hamlet
#

hi can someone help me code a simple tycoon style spawner?

granite rune
spring hamlet
#

sure

#

o mb i didn't realise you were talking to someone else

glossy totem
granite rune
#

didnt upload all my work

#

only 2 videos

shy cipher
shy cipher
shy cipher
# slate bloom so like a laser on a mirror

looks like you can't settle on a single system to send in the role application, you could try to combine these systems and you'll surely get accepted after adding comments to document em

grave zenith
#

What’s the best ai assistant for coding in luau ( don’t tell me Roblox default PLEASE )

slate bloom
#

Tbf tho laser is best

#

live updating btw

shy cipher
# slate bloom Tbf tho laser is best

you'd want something that combines different kinds of math (physical, vector, etc) while using a lot of the latest API, that's a guaranteed pass

slate bloom
shy cipher
grave zenith
shy cipher
slate bloom
#

Woah..

#

thats pretty sick

slate bloom
shy cipher
slate bloom
#

Already analyzed, 200 lines of code, 88% luau

shy cipher
#

most of the time I use it to decode what my if statements are saying because my logic is pretty fried

grave zenith
#

I’m firstly writing my code, then when it’s done I go to chat gpt then send the code and asking what could he improve but sometimes I’m asking tons of questions about his reasoning behind the new scripts

shy cipher
# slate bloom read that paste lmk

it does have the technical part and you do use a good amount of the API, but it doesn't have the main thing application readers look for. you have to explain how, not why. you can do this by explaining why you need to normalise the vector and why turning it to 1 is even beneficial. your tone while writing comments should be to teach, not to show what this thing does (except for obvious stuff like tables)

slate bloom
#

yh alr ty

grave zenith
#

That’s really impressive

#

@slate bloom you wrote that?

slate bloom
gritty vault
#

good or bad organization

grave zenith
shy cipher
gritty vault
#

mm

grave zenith
gritty vault
#

yeah i wish there were more organization tips

gritty vault
#

i use Single Script Architecture

grave zenith
gritty vault
#

its recommended for larger games

grave zenith
#

Modules are used to make the scripts more lights but not at this point

gritty vault
#

i need to find a way to have better file organization

#

and seperation of concern

#

but idk how

grave zenith
#

Your script better don’t have an error mate

strange kiln
#

this is good orginization

gritty vault
#

so i wanna fix it

shy cipher
strange kiln
#

trust

gritty vault
#

cause then you cant really infer what modules require which

#

and how theyw ork together

shy cipher
grave zenith
#

@gritty vault do you know that game we all used to play

#

I’ll try to demonstrate

gritty vault
#

yes

grave zenith
#

Think of the tower being the game

grave zenith
#

More you have wood more if you remove one wood that’s ok

#

But less you have wood in the structure more it’s risky for it to fall

#

That’s the idea

shy cipher
gritty vault
grave zenith
shy cipher
# gritty vault o

I'm gonna be honest with you, I think that this is the ONLY way to make modules tolerable and have a good life

#

drum rolls

grave zenith
#

Depends on the game

shy cipher
#

main script with all the modules under it, the require() will now only need script.module instead of long ahh "where was this module again"

gritty vault
#

πŸ₯Ή

grave zenith
shy cipher
#

the downsides are that if your main script is in a special location (like serverscriptstorage) then the client can't access those modules because serverscriptstorage is the no exploiter house

#

personally i keep the modules I want the client to have access to in repstorage (for both client and server), for server-only ones or the Main script ones they just chilling under the script

grave zenith
grave zenith
shy cipher
#

the point is that these modules contain small pieces of your game (like some function to teleport the character). then instead of having your main script have spleen drying amounts of code, you instead source that code from those modules to make your main code easy to read, and if you know anything about making sustainable modules you have to stop being an imbecile and start coding in --!strict

grave zenith
#

You can make a very lightly code by removing the modules inside by putting global modules

shy cipher
grave zenith
#

Not with jonga trust me

shy cipher
#

no actually WHAT the sauce is global module

grave zenith
shy cipher
grave zenith
#

It’s like putting stuff we always use for example :GetPlayerByCollisuonPart, :IsPlayerOnline or things like that IN one module called for example player handler or smth similar

shy cipher
#

ok but how does it make an individual global?

#

sir worldwide

grave zenith
shy cipher
grave zenith
#

What is your module so I can demonstrate with actual use

shy cipher
shy cipher
#

I'll get you my module

strange kiln
#

lol nerds

shy cipher
#

do you want an rbxm file or do you want me to format discord message into lua

grave zenith
#

Im on phone rn

shy cipher
grave zenith
#

Kinda lazy to open my pc just for a script

shy cipher
wheat field
#

yo

shy cipher
strange kiln
wheat field
#

can someone help to fix my script dm me

strange kiln
grave zenith
shy cipher
grave zenith
#

@shy cipher SEND DA MODULE !!!!!!!!!

wheat field
shy cipher
shy cipher
wheat field
strange kiln
wheat field
shy cipher
#

wait I'll be smarter and make a github gist

shy cipher
grave zenith
shy cipher
#

man I need MONEY to have someone teach me advanced coding

#

spent the last 21k I had on the damn levitation animation

#

gotta earn bread now

strange kiln
#

why did you spend 21k for an animation

grave zenith
shy cipher
shy cipher
#

what??

strange kiln
#

so you hired two of your classmates and gave them 21K robux for a sword burst animation

shy cipher
shy cipher
ember matrix
#

u can get easily like a animation for 500 robux if ur smart

shy cipher
shy cipher
strange kiln
#

dude

#

not to sound rude or anything

#

but how can anyone be THAT bad at buisness

ember matrix
shy cipher
#

I played a few games I used to play when I was a little slime

#

this time with robux

ember matrix
shy cipher
#

but whatever this guy is trying to hire freaking da vinci to make a donation game

strange kiln
fair mountain
#

What is the best way to learn scripting, I know a little bit about it and I've been practicing but I want to restart from scratch and learn for maybe and hour or two a day.

strange kiln
shy cipher
# strange kiln then where did the money go and why did you say something about an animation

first of all πŸ’₯πŸ’₯πŸ’₯πŸ’₯πŸ’₯πŸ’₯πŸ’₯πŸ’₯πŸ’₯ animations are expensive β€οΈβ€πŸ©Ήβ€οΈβ€πŸ©Ήβ€οΈβ€πŸ©Ήβ€οΈβ€πŸ©Ήβ€οΈβ€πŸ©Ήβ€οΈβ€πŸ©Ήβ€οΈβ€πŸ©Ή and games are βœ…βœ…βœ…βœ… expensive πŸ‘ˆπŸ»πŸ‘ˆπŸ»πŸ‘ˆπŸ»πŸ‘ˆπŸ»πŸ‘ˆπŸ» and πŸ₯±πŸ₯±πŸ₯±πŸ₯±

misty bolt
cinder basalt
#

theyre basically looking for that 4 years of experience to work for 1 hour

fair mountain
strange kiln
fair mountain
misty bolt
fair mountain
grave zenith
# shy cipher <@1388202065557328086> your move https://gist.github.com/drickmortey/cdbc8d005e...

That’s a short code but you can litteraly:

  • Move the function to the main script
  • Create module called CharacterCore and you can already fill with some functions:
    • ModelIsAValidChar(model: Model): Boolean
      This function will be used to take any model to check if it’s an actual character instance, depends on the game hierarchy but you either check body parts (if u have npcs) or if the character is controlled by a player
  • Can also add a module called PropertyHandler where you put a function called bulkChangeProperties(instance, properties: table) and litteraly change properties at the same time
    YOUR CODE WAS VERY MINIMAL SO I CANT YAP THAT MUCH
misty bolt
shy cipher
#

oh yeah the docs, love the docs guys

fair mountain
#

Alright, I'm gonna go watch his beginner series and then read some docs and crap

#

coding alongside of course

shy cipher
shy cipher
grave zenith
#

It’s like adding 0.01$ in the bank

shy cipher
grave zenith
shy cipher
grave zenith
#

You may ask « WHY SHOULD I USE A MODULE TO WRITE AS MUCH AS WITHOUT MODULEΒ Β» but you can actually use the module to prevents error that a normal script can’t do

shy cipher
shy cipher
grave zenith
#

Tell me one moment I said modules were useless

shy cipher
shy cipher
grave zenith
#

AHHH

#

Wait I meant a moment I said like modules shouldn’t exist

shy cipher
#

what were we talking about brother

grave zenith
#

But bro ur module is 23 lines, if I had to optimize you shi I should check out your full game organization

#

1 game organization can’t be used for an another game

shy cipher
shy cipher
grave zenith
shy cipher
#

WHAT is he explaining again

#

and it's jonga πŸ€‘ of course it is

grave zenith
#

Do you prefer having 1 big tower or 100 towers of 3 woods

shy cipher
grave zenith
#

OK LET ME TELL U 1 THING IM TRYING TO EXPLAIN FOR AN HOUR

shy cipher
grave zenith
#

Modules are ADDITIONAL services used for GENERAL cases and ETHICAL solutions, not for FUNCTIONS that a normal SCRIPT can EASILY DO!

#

Now you will become a pro in no time !

shy cipher
coral bane
#

Guys dm me um I thought these were game pass ids in script are they not (Can’t send pic dm to see)

tribal mango
#

Never use modules

tribal mango
#

My game runs off one 20,000 line script

#

Works great

shy cipher
shy cipher
tribal mango
grave zenith
#

@shy cipher wait I have a better definition of the use of modules for you

shy cipher
#

actually learning life lessons from my mentor missawdev ngl ngl

#

IF the MOON comes out tonight.. RUN! ahh advice

grave zenith
#

@shy cipher screen shot what I’m going to tell you

shy cipher
#

I'm listening teach

grave zenith
#

And put it as your computer desk background

shy cipher
grave zenith
#
  • Modules = general, reusable tools

  • Normal scripts = specific or simple logic

grave zenith
shy cipher
grave zenith
shy cipher
shy cipher
dark cedar
grave zenith
# grave zenith

Took me a while to do, please make this an international meme praysob

shy cipher
umbral elbow
#
local part = script.Parent
local teleportservice = game:GetService("TeleportService")
local queue = {}
part.Touched:Connect(function(touched)
    local humanoid = touched.Parent:FindFirstChild("Humanoid")
    if humanoid then
        local player = game.Players:GetPlayerFromCharacter(touched.Parent)
        if player then
            if not table.find(queue, player) then
                table.insert(queue, player)
                task.wait(5)
                teleportservice:Teleport(6963754059, player)
            end
        end
    end
end)
```w or l
umbral elbow
#

well

shy cipher
umbral elbow
#

This isnt for a game, I just made this in my free time

#

So it isnt like I put a ton of thought into it

grave zenith
shy cipher
safe lagoon
shy cipher
#

so get this: you're teleporting someone after explicitly putting them in a queue. queue for what? is this a party game that everyone has to teleport at the same time? why can you not just teleport them on part touch brother..

umbral elbow
shy cipher
grave zenith
umbral elbow
#

What would it work with?

shy cipher
solar inlet
#

guys how to fix the lag when i destroy a module script?

shy cipher
#

what about it

grave zenith
slate bloom
#

what can i create with a client side viewmodel gun system

icy dew
grave zenith
slate bloom
grave zenith
slate bloom
shy cipher
# umbral elbow What would it work with?

so like.. you can't find the player inside the table using the player in table.find(table, value). tables have indexes to find out where a value inside it is, a table is a neighborhood and the index gives the house address of the value. so with table.find you have to give the house address, not information about who owns the house to reach them

#

I barely use this part of the API this is just what I remember hold on let me see

icy dew
shy cipher
#

πŸ€”

dusty hemlock
slate bloom
#

that would work

#

i think

grave zenith
icy dew
grave zenith
#

Isn’t like {} the same

slate bloom
#

you get the idea

#

i coded it here it would be better

slate bloom
#
local Houses = {}

game.Players.PlayerAdded:Connect(function(Player)
    table.insert(Houses, Player.Name)

    print("Current Houses table:")
    for i, name in ipairs(Houses) do
        print(i, name)
    end
end)

shy cipher
#

you're right, I got it confused. I thought it wanted the index, but it actually returns the index

grave zenith
# slate bloom yes

Ok so your the type of people adding complex term to look cool and professional to get hire easely, earn a lot of money, start a Roblox business carrier, fly with a truck, strike few tables ?

slate bloom
grave zenith
#

@shy cipher , @slate bloom is a better version of me cathello

slate bloom
#

LMAO

grave zenith
shy cipher
slate bloom
#

ned

#

bed

#

do you want to create a fun game

eager karma
slate bloom
#

if we combine our excellent brain power we could create time travel or even better a good original Roblox game!

shy cipher
#

ohoho little chicken I am already making one and it is tasty (spaghetti)

slate bloom
#

a modeler

#

a animator

shy cipher
#

I need coding knowledge to do ts I don't know about you

slate bloom
#

wym

#

whats the game first of all

shy cipher
#

so like there's this girl in my class named Horrific Housing so one day I realised she's not getting updates from her parents anymore and she is now a corporate megaboss so I decided to go synthesise another one of her in my lab at detroit

slate bloom
#

i can model it

grave zenith
slate bloom
#

i used to watch it ALOT.

#

i love that game lmao

shy cipher
#

oh but it is horrible housing now

#

a banana bunch clat it is

slate bloom
#

can i helpppp

slate bloom
#

pleeaaseeee

shy cipher
#

in my block?

slate bloom
#

yes

grave zenith
#

Hey guys

muted onyx
slate bloom
#

i can reallylyy help

shy cipher
#

oh well.. jarvis, give him the appropriate tools to gain chronic disabilities

#

you're a part of the team

bronze path
#

NPC/player?

shy cipher
empty nebula
#

anyone wanna play or talk dm me

sweet iron
muted onyx
#

and we speak there

bronze path
#

Ok

bronze depot
#

any tester rq ? i pay 100 robux for 10min

bronze depot
sweet iron
sweet iron
#

@woven gazelle

#

100 robinkies!

merry shoal
bronze depot
#

nah too late

livid crater
#

what should i do after learning oop

#

mostly ig

tribal meadow
surreal swift
#

i finished a gamepass code that you can buy stuff and i need to see if its working can someone join me ? no need to buy just say if its there or not

dapper oriole
#

does anyone know how to do dependency management? wally is out the question because it doesnt work

bronze path
#

if it's because smth went wrong in the setup, at least show what went wrong

dapper oriole
bronze path
#

yeah i have no idea what you're talking about

#

wally doesn't break any autocomplete

#

just set it up with rokit

dapper oriole
#

return require will break auto complete buddy you can search oss discord. its a known issue

bronze path
#

there's alternatives, like psede that might do a bit more but i still dont see why ur tryna talk so bad about it

#

it literally works

#

the setup is quick

dapper oriole
#

the person who maintained the package acknowledged its an issue. how are you going to tryna blame me lol

bronze path
#

It sounded more like you were hating on it than just saying it's not suiting ur use cases

#

To me

#

Have you seen this?

#

in the ROSS server, i seen someone saying it could replace usage of wally and/or rokit, i've never used it but the name is popular so i remembered it

bronze path
dapper oriole
bronze path
#

i think that's what i meant to reply to, was wrong ab the autocomplete thing

#

wally would still prolly be widely used

dusty hemlock
bronze path
#

πŸ˜…

#

i type too much

#

πŸ’”

rigid viper
#

I needa programmer but everyone in hirbale sucks

bronze path
#

hmmm, what do you mean by "suck"?

#

seems to be exagerrating a bit

#

but you could try the talent hub or just asking ur friends

#

Or

#

you could make a hiring post yourself to see who responds to you

wild veldt
rigid viper
dusty hemlock
rigid viper
dusty hemlock
#

:)

wild veldt
placid dirge
#

Hello 😭

dusty hemlock
quaint anchor
#

why tf is a fps framework so hard to make bro

storm current
#

I'm trying to learn lua again but uh....welll....i'm probably gonna give myself a headache

hidden sail
#

but you could also.. try me out πŸ™ frfr

#

it depends on what you mean by they suck tho

rigid viper
hidden sail
#

how much you pay

somber vault
#

but i dmd him :(

rigid viper
somber vault
#

@rigid viper Whats ur game

hidden sail
swift bluff
#

hey guys im pretty new to scripting just wanted to ask is this good quality code?? local Round = {

mapchooser = function() -- this function chooses the map
    
    local maps = game.ReplicatedStorage:WaitForChild("Maps"):GetChildren()
    local cumalative = #maps

    local choosemap = math.random(1,cumalative)
    
    local map = maps[choosemap]
    local mapname = map.MapName.Value
    print(mapname)
end,


rounddetails = {
    uiroundtexts = { -- ui texts for the round
        [1] = "Intermission",
        [2] = "Round in progress",
        [3] = "Round Starting...",
        [4] = "Round ended Teleporting all players"
        
    },
    
    roundduration = 120, -- this is the duration of each round
    intermissiontime = 10, -- this is the time between each game so the intermission
    minimumplayersneeded = 2, -- minumum players needed for the round to start
    

}

}

return Round

#

@here

#

@everyone

#

since no one responded i guess its not that good

#

but ill imporve one way or another

#

watching tutarials and practicing will make me improve i think

somber vault
#

i like it

swift bluff
#

thanks

#

wait u actully like the codeπŸ™€

somber vault
#

well i dont code

#

but yes i like

iron kraken
green sparrow
#

the functions are added in his round table
local Round = {

mapchooser = function(),

}

#

whered _G come frmo

swift bluff
#

wdym

deft pasture
#

how would i make a freeze tag game

swift bluff
#

i dont understand

swift bluff
iron kraken
#

if u dont put local it becomes global

iron kraken
#

πŸ‘

green sparrow
#

local Round = {

mapchooser = function() -- this function chooses the map

    local maps = game.ReplicatedStorage:WaitForChild("Maps"):GetChildren()
    local cumalative = #maps

    local choosemap = math.random(1,cumalative)

    local map = maps[choosemap]
    local mapname = map.MapName.Value
    print(mapname)
end,
#

his functions are inside the Round table

iron kraken
#

o i see

#

mb i didnt know that

green sparrow
#

its fine

green sparrow
strange kiln
#

ooh yeah

swift bluff
#

lol

#

so its good right?

tribal comet
#

I have a question for you'll. How did most of you learn scripting? Because right now I'm just doing Youtube tutorials

rapid verge
#

i mean _G is used for like for command bar commands for plugins

tribal comet
#

alr

rapid verge
#

@tribal comet
learn module scripts -> meta tables -> object orientated programming

then you should be ready to go make systems and small projects

also like if you haven't, learn userinputservice and how to write better code

tribal comet
#

I have a question. I know server scripts are for the server and local scripts are for the client, but how do module scripts work?

iron kraken
tribal comet
#

how does it come in handy?

rapid verge
# tribal comet I have a question. I know server scripts are for the server and local scripts ar...

module scripts are scripts that you can run and they give you a value

you can use module scripts by using require

local mymodule = require() -- put your module script in the brackets

print(mymodule) -- {1,2,3}

you normally return tables but you can also return things like functions or strings

in the moduel script it would be like

local module = {1,2,3}

return module

module scripts can be accessed by both client or the server, but only once and the module script will run on the same side as the script thats requiring it

earnest hare
#

Guys I need help

tribal comet
earnest hare
#

I have an autoclicker feature that fires a remote event 10 times per second, to add money to the player. How can I fix this so it doesn't cause lag

tribal comet
#

and if it only runs once do you have to be careful on when to use it, or can you use it mor that one time?

iron kraken
rapid verge
# tribal comet how does it come in handy?

you can store functions in the table thats being returned and call them

this makes it act like a custom service or framework you can use to help handle code

local module = {}

module.PrintMessage = function(msg)
    print(msg)
end

return module
local mymodule = require(putmodulescripthere)

mymodule.PrintMessage(123) -- 123
oak umbra
#

yo I need help I have a really nasty issue

earnest hare
# tribal comet Can you show the code?

local function startAutoClick()
if autoClickLoop then return end
autoClickLoop = true

    task.spawn(function()
        while autoClickLoop do
            if canAutoClick then
                canAutoClick = false

                local ore = plot:FindFirstChild("MainStone") and plot:FindFirstChild("MainStone"):FindFirstChildWhichIsA("Model")
                if ore then

                    
                    local oreCash = CalculateOreCash(player, ore)
                    
                    
                    ClickOreEvent:FireServer(ore, true)
                    
                    task.spawn(function()
                        for i = 1, 10 do
                            showCashPopup(ore, oreCash)
                            task.wait(0.1) -- 10 popups spread evenly across 1 second
                        end
                    end)
                end

                task.wait(1) -- auto-click debounce
                canAutoClick = true
            end
            task.wait()
        end
    end)
end

local function stopAutoClick()
    autoClickLoop = false
end

-- Listen to Enabled state
local gamepasses = localPlayer:WaitForChild("Gamepasses")

if gamepasses:GetAttribute("AutoClickerEnabled") then
    startAutoClick()
end

gamepasses:GetAttributeChangedSignal("AutoClickerEnabled"):Connect(function()
    if gamepasses:GetAttribute("AutoClickerEnabled") then
        startAutoClick()
    else
        stopAutoClick()
    end
end)
oak umbra
#

yo wait whose smart here who can help me

real hemlock
#

depends what on

rapid verge
oak umbra
# real hemlock depends what on

idk it randomly happened to my game I tried going back 5 versions and it still had the same bugs, its just a bunch of local script and gui stuff

Infinite yield possible on 'ReplicatedStorage.RemoteEvents:WaitForChild("BuyCosmeticPack")' - Studio
23:35:43.409 Stack Begin - Studio
23:35:43.409 Script 'Players.Dequixel.PlayerGui.CosmeticShop.CosmeticShop', Line 14 - Studio - CosmeticShop:14
23:35:43.409 Stack End - Studio
23:35:43.425 Infinite yield possible on 'Players.Dequixel.PlayerGui.Top.Frame:WaitForChild("Tools")' - Studio
23:35:43.425 Stack Begin - Studio
23:35:43.425 Script 'Players.Dequixel.PlayerGui.Top.Frame.LocalScript', Line 12 - Studio - LocalScript:12
23:35:43.425 Stack End - Studio
23:35:44.409 Infinite yield possible on 'Players.Dequixel.PlayerGui.ToolShop1.Frame.ScrollingFrame.ToolCard_Freeze Ray.SeedImage.Preview.WorldModel.Freeze Ray:WaitForChild("Handle")' - Studio
23:35:44.409 Stack Begin - Studio
23:35:44.410 Script 'Players.Dequixel.PlayerGui.ToolShop1.Frame.ScrollingFrame.ToolCard_Freeze Ray.SeedImage.Preview.WorldModel.Freeze Ray.LocalScript', Line 5 - Studio - LocalScript:5
23:35:44.410 Stack End

tribal comet
real hemlock
#

Trace the script producing the error. PlayerGui.CosmeticShop.CosmeticShop', Line 14

#

You just have yields

summer phoenix
#

Guys what's brown and sticky

tribal comet
#

It shows me how dumb i really am when i see others code. WHYYYYY

summer phoenix
#

πŸ˜‚

rapid verge
warm spindle
#

Anyone wanna give feedback on portfolio?

tribal comet
#

We give feed back on yours or you to ours?

oak umbra
# real hemlock Trace the script producing the error. `PlayerGui.CosmeticShop.CosmeticShop', Lin...

I just disabled it and still got the error
Infinite yield possible on 'Players.Dequixel.PlayerGui.Top.Frame:WaitForChild("Tools")' - Studio
23:40:57.063 Stack Begin - Studio
23:40:57.063 Script 'Players.Dequixel.PlayerGui.Top.Frame.LocalScript', Line 12 - Studio - LocalScript:12
23:40:57.063 Stack End - Studio
23:40:58.081 Infinite yield possible on 'Players.Dequixel.PlayerGui.ToolShop1.Frame.ScrollingFrame.ToolCard_Freeze Ray.SeedImage.Preview.WorldModel.Freeze Ray:WaitForChild("Handle")' - Studio
23:40:58.081 Stack Begin - Studio
23:40:58.081 Script 'Players.Dequixel.PlayerGui.ToolShop1.Frame.ScrollingFrame.ToolCard_Freeze Ray.SeedImage.Preview.WorldModel.Freeze Ray.LocalScript', Line 5 - Studio - LocalScript:5
23:40:58.081 Stack End - Studio
23:41:22.445 β–Ά [PlayerSetup] Saved Dequixel: $99584200, R2, tools# 27 (x2) - Server - PlayerSetup:81
23:41:26.695 [Wheel] Dequixel won $5K (type=currency, value=5000) | tickets=0 | nextFree=10800s - Server - SpinWheelService:113
23:41:29.930 [Wheel][Client] You won: $5K (number= 3 ) - Client - SpinWheel:145
23:41:31.612 1 is not a valid member of Frame "dialogResponses" - Client - DialogModule:141
23:41:31.612 Stack Begin - Studio
23:41:31.612 Script 'ReplicatedStorage.DialogModule', Line 141 - Studio - DialogModule:141
23:41:31.612 Stack End

and my dialogue stopped working too-I got it from a open source though

warm spindle
tribal comet
#

Alright let me see.

swift bluff
#

@tribal comet i just wathced tutarials

#

and learned

real hemlock
tribal comet
warm spindle
real hemlock
#

It is written in plain english my friend.

oak umbra
#

so I gotta go to each individual script and fix it?

warm spindle
#

@tribal comet how is it

real hemlock
#

i doubt it too badly

oak umbra
#

just all the gui stuff

real hemlock
#

if its the dialogue system thasts cos thats an error

tribal comet
real hemlock
#

yh then fix

tribal comet
#

Quite buns

warm spindle
#

Yeah...

#

Anyone here experienced in scripting

oak umbra
#

is it cuz I got it from an open source?

#

cuz I havent touched it

real hemlock
tribal comet
#

Although i only have half a year of experience.

real hemlock
warm spindle
real hemlock
#

Errr

#

Maybe

fleet siren
#

If i had a game with leveling can i put the values in starterplayer or does it have to be loaded with leaderstats?

tribal comet
#

Why did code-discussions, like the most dead chat blow up?

oak umbra
fleet siren
tulip fable
#

how do i stop my character from getting flinged when colliding with an part during body velocity?

real hemlock
#

but u could do with some code samples

warm spindle
#

Since its backend only

real hemlock
#

it looks a bit repetitive

warm spindle
real hemlock
#

i wouldnt use art station either

tulip fable
warm spindle
real hemlock
#

seems like same style game

warm spindle
#

Oh wait

#

Lemme show you something

#

1 sec

tribal comet
#

Ima go Bye!

real hemlock
#

Yes

#

the prints look unprofessional but ig thats fine

warm spindle
#

Yeah

#

It was still in testing phase

real hemlock
#

fe

warm spindle
stiff cliff
#

How do you make that

#

I really wanna know

#

has plenty of potential

glacial girder
tribal mango
tardy shard
glacial girder
#

it portfolio no scaming

warm spindle
real hemlock
#

Any opinions on this feature request? I think it is fairly reasonable. https://devforum.roblox.com/t/commit-history-and-better-version-control/3992449

#

Unless I am stupid I do not see roblox offering this.

sinful egret
deft coral
#

and like

#

basically github without github

compact spoke
#

I mean packages already have that

deft coral
#

they do yeah

#

and also individual scripts

#

etc

#

no package or anythign else needed

real hemlock
#

Too vague

#

I want to see script history in bulk commits and publishing games

#

to save having to revert live builds too

compact spoke
#

packages

deft coral
#

and again as parker said

real hemlock
#

I think ROBLOX would consider it as it would obviously keep people inside studio.

deft coral
#

packages

warm spindle
#

Im thinking of like a

real hemlock
warm spindle
#

Roblox studio inside of a roblox computer

#

Roblox studio in a viewport frame

sinful egret
deft coral
#

Ur not, this is without packages. Parker is just suggesting an even more extensive feature for syncing

warm spindle
sinful egret
#

damn

sinful egret
#

any tips

warm spindle
warm spindle
deft coral
#

its not exactly the most complicated thing in the world, no offense to anyone involved in it

compact spoke
real hemlock
# deft coral

Yes but how do I see all scripts committed in a version?

warm spindle
real hemlock
#

without packages lets say

#

If a bug presents in a version, why do I need to revert my game in full - why can I not just see the scripts edited and reverse it in full, or review the commit diff to see what was changed?

warm spindle
real hemlock
#

It's a consistent issue impacting my building team and modellers across the board.

#

Version history requires a fuller expansion, does it not?

deft coral
#

And that requires no reversion

warm spindle
deft coral
warm spindle
deft coral
#

and humanoids with accessories

deft coral
warm spindle
#

So I made tables with "keyframes"

warm spindle
#

But still

#

Better to have a grip over everything

deft coral
#

Not really

deft coral
warm spindle
#

So I can say everything was made from scratch

deft coral
#

Im speaking pragmatically btw, I have respect for doing things the hard way for the sake of learning it or fucking with it

warm spindle
#

Also I used some functions roblox doesnt provide and were essential

#

So ig thats just a showcase

deft coral
#

Right click a script, View Script History

real hemlock
real hemlock
deft coral
#

As I said though, which was agreeing (thus the 'visibility is an issue'), seeing all changes can be annoying. But individual script changes are already supported, as well as viewing the batch

deft coral
#

Like it knows clearly what version has what script versions

real hemlock
#

Yes my point exactly

deft coral
#

Idk why they wont let us see it

#

Unless we're dumb and havent found it

real hemlock
#

Why cant they either open up api or

#

make a new page with a button view full changes

deft coral
#

Yeah you think like it'd be a button in Version History

#

But no it just takes you to the website

#

for literally no reason

real hemlock
#

could just add into here

#

if they cba for a frontend addition

#

lolll

tall onyx
#

i got vfx sycned in animation with moon animator how do i make it work in script?

real hemlock
#

i assume scripts in batch

deft coral
real hemlock
#

maybe has a link

tall onyx
deft coral
#

Really weird

#

I really hope its not just somehow localized in the literal save file, unable to be obtained easily to frontend