#code-discussion

1 messages · Page 161 of 1

fathom sundial
#

pretty much a soccer ball kinda thing to put in my game

stoic stag
#

ohhhhhh

kind pond
#

anyone want tutoring on modeling

stoic stag
#

lowk i could be done @kind pond

stoic stag
#

for this just use physics
like bodymovers or w/e because it replicates on all clients

fair copper
#

like position etc

stoic stag
#

bodymovers are deprecated but im sure there are new things out there

stoic stag
kind pond
#

i dmed u

stoic stag
#

would u be available to do it on the weekend like sat or sunday because my school starts today and its also 1 am rn

fathom sundial
stoic stag
#

what you can do is

fair copper
stoic stag
#

^

fair copper
#

use a packet module by suphi kaner

stoic stag
#

broooo are you sure those even work @fair copper

fair copper
#

it'll reduce ur network lag and communication 10x

stoic stag
#

like those libraries and stuff

#

just use good old roblox

fair copper
#

it works

#

alot for pvp games

fathom sundial
#

so best bet is to just stick with the slight delay for communication?

fair copper
#

or stuff that involves multiple parties

#

i have it running on my game

#

🔥

fathom sundial
#

ill try that out ig where do i find it at

fair copper
#

--  the main Packet library constructor
local Packet = require(script.Parent:WaitForChild("PacketModule"):WaitForChild("Packet"))

--  game's specific packets
local Network = {}

-- 3. Define each packet
Network.AttackRequest = Packet("C_AttackRequest",
    Packet.Static1, 
    Packet.Vector3F32,
    Packet.NumberF32
)

Network.ActionRequest = Packet("C_ActionRequest", 
    Packet.Static1,
    Packet.Vector3F32
)

Network.AttackPlay = Packet("S_AttackPlay",
    Packet.Instance,      -- The attacker's Character
    Packet.Static1,       -- The attackId
    Packet.String,        -- The style name
    Packet.NumberF32,     -- The speed override
    Packet.Vector3F32     -- The movement/target direction
)

Network.ActionPlay = Packet("S_ActionPlay",
    Packet.Instance,      -- The attacker (plr)
    Packet.Static1,       -- The actionId
    Packet.String,        -- The style name
    Packet.Vector3F32,    -- The direction vector
    Packet.NumberU16      -- The sequence number
)

Network.ApplyKnockback = Packet("S_ApplyKnockback",
    Packet.Instance,      -- The character part to apply knockback to
    Packet.Vector3F32,    -- The direction of the knockback
    Packet.NumberF32      -- The force of the knockback
)

-- [MODIFIED] Added isPlayerHit and attackId to match the server's data
Network.DamageHit = Packet("S_DamageHit",
    Packet.Instance,      -- The part that was hit
    Packet.NumberU16,     -- The damage amount
    Packet.Boolean8,      -- Was it a critical hit?
    Packet.NumberF32,     -- The knockback force
    Packet.Boolean8,      -- Was the target a player?
    Packet.Static1        -- The ID of the attack that hit
)

Network.FallImpactOccurred = Packet("C_FallImpactOccurred",
    Packet.NumberF32 -- The duration of the fall impact animation
)

Network.GroundSmashLanded = Packet("C_GroundSmashLanded", Packet.Vector3F32)
Network.PlayGroundSmashVFX = Packet("S_PlayGroundSmashVFX", Packet.Vector3F32)

Network.ApplyKnockback = Packet("S_ApplyKnockback",
    Packet.Instance, -- The character part to apply knockback
    Packet.Vector3F32, -- The direction of the knockback
    Packet.NumberF32, -- The force of the knockback
    Packet.NumberF32 -- duration of knockback
)

Network.CooldownStarted = Packet("S_CooldownStarted", 
    Packet.Static1,
    Packet.NumberF32
)

Network.HitboxHit = Packet("C_HitboxHit", 
    Packet.Instance,  -- The target's Humanoid
    Packet.Instance,  -- The specific BasePart that was hit
    Packet.Static1    -- The attackId
)
Network.BlockRequest = Packet("C_BlockRequest", Packet.Boolean8) 
Network.BlockStateChange = Packet("S_BlockStateChange", Packet.Instance, Packet.Boolean8)
Network.BlockBreak = Packet("S_BlockBreak") 
Network.SelectClass = Packet("C_SelectClass", Packet.String)
--  Return
return Network
stoic stag
#

Woah buddy

fair copper
#

hear me out yeah these are all remoteevents but use binary decentralization

stoic stag
#

tf

#

like protobuf?

fair copper
#

but i have no remote events on the storage

stoic stag
#

protobuf but for roblox?

fair copper
#

its based on NET framework but its specifically for roblox yea

#

u just define data type

kind pond
#

anyone want tutoring on modeling
DM me

fair copper
#

like Vector3F32 n stuff stuff

#

low latency data

#

breaks down the server - client bandwidth by alot

stoic stag
#

Bro lowk that is so cool

#

how does it work

fair copper
#

yeah like u got tables n stuff

stoic stag
#

how are people so smart to make this stuff

#

its totally incredible

fair copper
#

--[[
S8 Minimum: -128 Maximum: 127
S16 Minimum: -32768 Maximum: 32767
S24 Minimum: -8388608 Maximum: 8388607
S32 Minimum: -2147483648 Maximum: 2147483647

U8        Minimum: 0                Maximum: 255
U16        Minimum: 0                Maximum: 65535
U24        Minimum: 0                Maximum: 16777215
U32        Minimum: 0                Maximum: 4294967295

F16        ±2048                    [65520]
F24        ±262144                    [4294959104]
F32        ±16777216                [170141183460469231731687303715884105728]
F64        ±9007199254740992        [huge]

]]

stoic stag
#

ima take a piss brb

fair copper
#

stuff u can store based on the binary n serials

kind pond
#

anyone want tutoring on modeling

#

dm me

fair copper
#

if im using Vector3F3 instead of Vector3, i can pass around +-16777216 numbers max min of data

#

not more

fathom sundial
#

Yall know about fastcast right

fair copper
fathom sundial
#

no no

#

idk what shapecast is

#

fastcast is like the go to for projectiles and stuff its kind of its own physics engine

#

in roblox

fair copper
#

Ahh

#

yeah maybe i havent gone into projectile physics yet

#

but im sure it just uses raycasts in a better way

fathom sundial
#

i dont really know how i could apply it to a soccer ball but i feel like thats probably the best bet considering its crazy fast

fair copper
#

link me

#

if theres a module

fair copper
#

hmm

#

u seem like a new guy at this so my advice wwould be just using roblox's module for now and modules u know about

fathom sundial
sudden estuary
fair copper
#

then start taking apart the module

#

and study it prob

#

💯

#

before applying

sudden estuary
#

so you could apply force onto your projectile and move the trajectory likewise

#

but idk if it would be ideal for a football

#

since its just a single ray unless they implemented sphere cast too

fair copper
#

i lowk havent script football yet

#

but a single ray would be more accurate than a volumetric one no?

sudden estuary
fair copper
#

collision of football with what

sudden estuary
#

with surrounding

stoic stag
#

Why don't we just rely on actual Roblox physics with actual BodyMovers and stuff?

fair copper
#

because unreliable

fathom sundial
#

theyre kind of janky

fair copper
#

idk

#

like ive tried maybe i was doing something wrong

#

physics is unstable

stoic stag
#

I mean i feel you a tiny bit but

fathom sundial
#

i tried using linear velocity i feel like my settings were wrong slightly but when i set the y velocity it just didnt work

stoic stag
#

What you would have to do

#

I'm pretty sure

#

when you kick a soccer ball for example

fair copper
#

what about

#

align oreintation stuff

#

i was using body velocity linear velocity, impulse, but so far the align ones have yielded better results, obviously this is subjective

fathom sundial
#

i dont got much experience with aligners but ill do some research on them

sudden estuary
#

bodymover or not , you still need something to detect collision

maiden otter
#

guys so I have a system where the guy teleports to another block repeatedly but how can I make the system where the guy can walk automatically intead of teleporting

stoic stag
#

Wait hear me out @fair copper I'm curiosu what you think:

Someone kicks the ball with a certain power
The power/speed is fired to all clients
The clients using render stepped constantly update the ball, and you make use of delta time 
sudden estuary
stoic stag
#

now that i said that, it seems actually awful

stoic stag
fair copper
#

desynced ball

stoic stag
#

fuck why is this so hard

sudden estuary
sudden estuary
stoic stag
#

ohhh

fair copper
#

and since the client is controlling the ball's movement u will need sanity checks n stuff

stoic stag
#

not really, oh actually yes

sudden estuary
#

you predict the motion in client with sent time,velocity

sudden estuary
stoic stag
#

i think this is an impossible problem

fair copper
#

just simplify it

stoic stag
#

@fathom sundial there is something called an UnreliableRemoteEvent

#

maybe you can try using that?

fair copper
#

unless ur tryna make too realistic football

stoic stag
#

is football soccer or actually like football

fathom sundial
#

soccer

sudden estuary
stoic stag
#

Yea

#

@sudden estuary do you have an example of one?

fathom sundial
#

so whatd id have to do is calculate the kick or whatever on both sides, client and server, and then fire it and use unreliables and deltatime to sync them all together on the players ends??

stoic stag
#

i think so but honestly atp im so confused just like you

plain jetty
#

yo i need someone who script me one script with vfx i can pay in robux

plain jetty
sudden estuary
#

no im not interested

stoic stag
#

ima look at it @sudden estuary

#

dude woah woah woah

#

woah woah woah

#

@sudden estuary best scripter ive ever seen hands down

sudden estuary
#

no its not ym script

stoic stag
#

no?

sudden estuary
#

its a open source from some hackweek ig

stoic stag
#

damn

#

it looks crazy

#

i dont get any of this

sudden estuary
#

i think its made by some roblox staff ig don't remember well

stoic stag
#

dude thats crazy how talented these peoplea re

sudden estuary
#

since its ur first time u feel overwhelmed thats all

#

you started when u were 8

#

idek what i was doing when i was 8

#

so its alright, we all were stupid when we were 8

stoic stag
#

ur awesome bro

#

C

#

my fav lang

fair copper
#

i have 5 years of exp

#

where i scripted a kill block for 2 hrs every sunday

stoic stag
#

lol

lost pebble
fair copper
#

too high

#

How differently and efficiently can people script a kill block?

#

is the most efficient way , running a ecs

#

if not whats better

lost pebble
#

this man's too powerful

fair copper
stoic stag
#

yo actually thats such a good thought

lost pebble
stoic stag
#

touched is too bad

fair copper
#

ye im debating about it now

#

i think just using a ecs for environmental damage is efficient enough

#

🥀 what rabbit hole

fair copper
blazing oasis
fair copper
blazing oasis
sudden estuary
#

what

fair copper
#

what do we think about controlled globals

#

like setter n getter patterns

blazing oasis
marsh kelp
# blazing oasis where t o find open source things
sudden estuary
#

anyone here has experience with reverbing sounds in runtime

gloomy pasture
#

all of this for some fireflies

celest cipher
sullen rain
#

anyone know how to make a combat system and ai enemy

hollow forum
#
local hello = hello
toxic pasture
#

looking for script

#

(late reply)

fair copper
hollow forum
late nexus
#

guys do ya remember me?

fierce wharf
#

who help me with learn script but free

royal moth
#

how to make killbrick

sullen rain
fierce wharf
#

ok

#

@sullen rain

sullen rain
#

yes @fierce wharf

#

give me you're roblox user i am adding u in my roblox place then we can do

#

or i give u then add me

#

@fierce wharf

fierce wharf
#

ok

#

cantea123490

#

@sullen rain

sullen rain
#

wait

#

which?

fierce wharf
#

first

#

but pls add me

sullen rain
#

ok

fierce wharf
#

for add

sullen rain
#

ur in mobile?

fierce wharf
#

pc

sullen rain
#

wait

#

u don't have a connection showing

celest cipher
fierce wharf
#

you add me?

sullen rain
#

yes

fierce wharf
#

what suername

#

you have

sullen rain
#

Divyansh_Op25

fierce wharf
#

ok

sullen rain
#

friend me

fierce wharf
#

pls add

sullen rain
#

on robloxs

fierce wharf
#

i add you

#

pls accept

sullen rain
#

now check on roblox

#

studio

fierce wharf
#

ok

#

now what

sullen rain
#

u have a tutorial named place?

fierce wharf
#

what

sullen rain
#

wait i am joining

sudden loom
#

bro what are you guys on

fierce wharf
#

i need learn script

sudden loom
blazing oasis
#

GUYS IS A CHARACTER FLIGHT SYSTEM GOOD ENOUGH FOR THE HIDDEN DEV scripter apps??

still egret
#

Can someone make a discord box.

sudden estuary
#

discord box

modern hazel
#

how the hell do you use remote events

sterile pollen
#

how do you get the mouse position , the mouse.Hit.Position is bad, since it doesnt accurately give me the postion when i fire a projcetile at it

sudden estuary
#

cast a ray from UnitRay.Origin with direction UnitRay.Direction * Length

nocturne totem
#

is their something wrong with this yall i have been trying to solve my games save data for like 3 years (i gave up on the project due to this exact reason) but really want to finish this game, im just really confused on why my game doesnt save leaderstats

novel glade
#

why are there mysterious tracks called Animation being played in my character's animator when the Animate default local script is empty and I've labeled every animation in my game
this is also bugging out when I use my animation controller to cleanup and restart while I'm playing an animation like running

novel glade
#

you can just put prints all over the place there

stone garden
jovial crown
#

any experts at equiping 3d armor to characters

verbal hound
#

is this ok for my game🙏

zenith shoal
#

for real

#

I believe that

#

if we take the truth into account

#

I think we could have a constructive response and that I could answer you

#

but in reality the truth is that in fact...

#

idk if its good or not for ur game

sudden estuary
hallow crag
verbal hound
sudden estuary
light shadow
light shadow
#

algorithm gona love this one 💦 👄🥵🍆

pseudo elk
#

lol

fast drum
#

can someone explain how "or" works when initialising a variable

fallen dock
#

i need someone to make a game with im making themap animating a lil bit and the characters (its a brainroot game )

surreal ether
#

if you do
local variable = workspace:FindFirstChild("A") or worksapce:FindFirstChild("BB")

then variable will be whatever is valid first

fast drum
#

if workspace:ffc("A") then
variable = workspace:ffc("A")
else
variable = workspace:ffc("BB")

#

smth like that?

fast drum
#

wait icl thats rlly clever

#

this wouldve saved so many lines of code for me 😔

#

how does "and" work then?

hallow crag
fast drum
#

is it like a truth table or smth?

#

if both conditions then set that variable to the value, else

hallow crag
#

u can use that logic in your code

fast drum
#

but youre feeding 2 values

#

which one will the variable take if both are true?

hallow crag
#

if both are true it will just return the 2nd value

zenith shore
#

Example, if you want a value to always be a table:
local randomVar = {[1] = 5}
local myTable = type(randomVar) == "table" and randomVar or {}

#

it checks if randomVar is a table, if so then myTable = randomVar
if randomVar is NOT a table then myTable = {}

fast drum
#

ok i understand it now

#

ty

surreal ether
#

truthey and falsey

#

if i spelled it correctly

kind pond
#

dm me if u want lessons on modelling

fast drum
#

also what is exponential backoff

surreal ether
#

like 1-2-4-8-16 seconds.. etc

fast drum
#

whats the benefit in increasing the time and why exponentially?

surreal ether
#

idk

#

prevents spamming

fast drum
#

wait

#

in my case its with data saving

#

the interval between saving the data if failed the first time is apparently better with exponential intervals

#

acc nvm i got the answer

#

nothing too crazy tbh

#

just server strain

zenith shore
#

For datasavings, don't repeat something infinitely

#

Or for most things really

fast drum
#

also is it better to add autosaving or should i just keep it for when a player leaves the server

#

?

hallow crag
#

it shouldnt be frequent tho

#

maybe every 2 mins

zenith shore
#

I would recommend every 60s

hallow crag
#

or just use profilestore and dont worry about data saving

zenith shore
#

I would recommend making your own datastore once you are skilled enough

hallow crag
#

i prefer use a datastore module that has been hard tested

zenith shore
#

So you can make custom stuff

fast drum
hallow crag
fast drum
#

saving with retries ?

zenith shore
#

Does profilestore allow you to make custom OPP methods?

cloud meadow
fast drum
gilded ruin
#

Hiring UGC investors, DM ME! (I own a roblox ugc group with over 500 sales, and I am in need of investors to help cover the costs. I myself am the modeler

fast drum
#

or are you asking about the interface?

hallow crag
zenith shore
#

I like my data to be combined with OPP

#

So I can create my own methods

distant temple
#

What is the best ai for coding

#

is it deep seek?

fast drum
#

it seems quite similar to oop

zenith shore
#

It's more practical for it to be combined

cloud meadow
fast drum
#

yh im not experienced enough with gui to be doing this sorry😔

dusky jacinth
rigid rover
#

:Emit()

dusky jacinth
rigid rover
#

why

dusky jacinth
#

i was wondering if u can give me insight on how to do it in dms but yeah

static coral
dusky jacinth
static coral
#

then use youtube and luau.org and roblox docs

dusky jacinth
#

ok

dusky jacinth
zenith shore
#

Is it better to use MemoryStoreService or DataStoreService for global leaderboards?

prisma gulch
prisma gulch
surreal ether
#

and is stored in the memory of roblox cluster

#

that is distributed

ripe plume
plain jetty
#

Someone help me i can pay in robux

eternal schooner
#

can someone tell me how to do a ball system like blr ( the way the ball welds to ur feet)

spring patrol
#

what would you guys say is the best way to make projectiles like bullets or rockets?

dusky jacinth
dusky jacinth
#

@prisma gulch

prisma gulch
dusky jacinth
prisma gulch
keen zephyr
#

How can I add a debounce to my script so that when the player touches the block, they only lose health once every second

indigo thorn
#

Gtg

slender owl
final ivy
hearty shard
#

I was wondering if anyone could help me figure out how I can learn to code Ive tried things but noting seems to work

zenith shore
#

tutorials, AI and tons and tons of trial and error

fading hull
#

Anyone wanna work on a bleach game alongside 9 other devs

dusky jacinth
hearty shard
dusky jacinth
hearty shard
nova thorn
whole tundra
#

I‘m looking for someone who can make good Discord Servers if you think you are the one DM me paying method (crypto, robux, Paypal)

celest cipher
hot wraith
quasi pond
#

Guts

#

Who's a good builder or scripter

summer phoenix
#

hm

pearl geode
#

looking to start a new team, im a 3d modeler, if anyone is interested dm me!!

mystic yacht
#

whats a fair price for a full supermarket simulator styled game? it includes timely shop resets, building, stocks, cashier counter management, npcs, day night cycle and yeah

lean patio
strange bobcat
#

dm for builder

subtle sage
subtle sage
# nova thorn

holy shit he figured out what velocity is (nice work im just jk)

plain jetty
#

someone help me fix bug i can pay in robux

gloomy marten
#

can anyone help me, im new to making roblox games and i made an event game, i have a lobby, obby, ptb arena and sf arena but i dont know how to add a menu to select wich game to start so players teleport there and the game systems ( like how to script the bomb and effects)

nova thorn
#

kick system

nova thorn
#

there are several systems

fair copper
#

guys how to get tool animations to not break?
if i put animations in a tool but i need to make the player equip and unequip that tool, it need to break the motor6d inside.

#

which breaks the anim

#

is there a good workflow that deals with weapons and inventories

narrow bolt
#

Guys

#

I want to make a dev team where d I go

pseudo silo
real zealot
pseudo silo
#

this odd tilt

polar edge
polar edge
#

if i got chased by that i amm gonna run laughing 😂

pseudo silo
#

that ain’t answer my question

fair shoal
light sigil
#

who an advanced scripter looking for sum work

granite forge
#

Me

stone garden
cloud meadow
woven ingot
#

i made a source engine bhop roblox game engine its fully unfinished i wanted to show everyone it tho to give people an idea or maybe some inspiration or people who want to help work on it in #⭐creations

tired stag
#

does anyone need one of the best game dev physics math tutorials on youtube

inland token
#

what should i do to learn how to script from scratch

granite forge
#

Use YouTube and search up lua tutorials

inland token
granite forge
#

Nah most roblox tutorials are buns

#

Go for a lua tutorial first

ruby iron
granite forge
#

Then learn how to use it on Roblox

frosty otter
#

tryna generate vegas 🔥

#

this is the array(its just flat with squares making it up and its a grid of 1s and 0s)

stark geyser
frosty otter
stark geyser
#

oh you mean like actual vegas

frosty otter
#

it was meant to be like 1:10

#

but i dont know anymore

#

i just mixed it up until it looked good

marble nova
#

why does disabling mouse icon floods my output with errors when i stop a test

#

all the errors disappear when i comment this line

sick saffron
#

guys you know the vehicle seat object and how it has a sit() method

#

does it also have a method to for the player to get off

pearl geode
#

hey guys im looking for people to create a new team, im a 3d modeler in blender, i need a scripter,animator,builder. dm me!!!

light sigil
stone garden
#

i m a solo dev

craggy current
#

is there going to be a noticeable performance hit from using humanoids for enemies in a tower defense game?

stone garden
compact spoke
#

and an animator to run animations

craggy current
#

😭

#

this server never fails to disappoint

frosty otter
#

0.2ms of ping extra

#

huge difference

#

idk tho

pallid furnace
dense apex
#

I'm quite curious, is there a way to make like videos play in-game? Without it violating TOS. Youtube videos for example.

umbral carbon
#

It allowed you to play videos

#

Maybe try that out

dense apex
#

Just think it could be a cool background thing to have TV's playing certain things.

umbral carbon
#

There's a variety of videos you'll find in the toolbox

#

Or asset marketplace

limpid axle
#

Gettin good at coding ngl

umbral carbon
inland token
#

how do i learn how to code from scratch and having never written a single code

granite forge
#

Learn lua on YouTube

urban palm
#

Local yoink = 1

Local function yoinkersploinkers()
Yoink = Yoink + 1
end)

While true do
Task.Wait(1)
yoinkersploinkers()
end

Thoughts on this script lads

#

(Not a real script btw)

twin basin
brazen hornet
#

hi scripters

#

does anyone wanna make a game

#

me builder u script

shy furnace
#

Any scripter wanna make game I already made like $1500 in a week from games but my scripter quit lmao

native quest
#

Yeah sure bro, I require 90℅ tho.

twin basin
#

anything but learn scripting these days...

shy furnace
#

I mean im trying to rn but

brazen hornet
shy furnace
#

its gonna take a while

brazen hornet
twin basin
#

getting good enough to make a proper game takes like half a year

twin basin
#

and this again depends on what ur making

brazen hornet
#

no i take my time with it

brazen hornet
#

cardi b

#

🤦‍♀️

twin basin
#

some kind of creature

brazen hornet
#

you just havent updated yet

native quest
#

I'm recreating real life, so far 0.0000000000000000009℅ done, it's all about effort.

shy furnace
#

is yt best way to learn scripting at the start?

brazen hornet
#

the only celeb i really like is ariana grande

twin basin
shy furnace
somber vault
twin basin
brazen hornet
ruby iron
brazen hornet
#

not roblox games

somber vault
ruby iron
somber vault
ruby iron
shy furnace
somber vault
#

🤨

twin basin
shy furnace
#

like look at the code

shy furnace
somber vault
#

i loved using topbarplus

#

😍 😍 😍 😍

ruby iron
somber vault
#

or

#

hm

ruby iron
#

fusion for ui tho >>>>

#

and janitor/maid

somber vault
#

ouu

#

i dont use cleanup modules unless i am doing a dedicated project

ruby iron
#

you should

#

all the scripts in tvl use janitor

somber vault
#

oh fun

#

ill have to use it more then!

#

i love your work on tvl btw its so amazing

acoustic umbra
#

hey, does anyone know how to change alingRotation pivot?

somber vault
#

the wheel system was genius

ruby iron
somber vault
shy furnace
shy furnace
#

Parameters

somber vault
#

adding numbers is very handy when coding

#
  • you can make a calculator
#

that was the first thing i ever made with a module

#

4 months ago was when i first started advanced scripting

shy furnace
#

bro but like u use parameters for more then this tho right 😭

twin basin
acoustic umbra
zenith shore
shy furnace
#

its not function example

somber vault
shy furnace
#

its parameter example

shy furnace
somber vault
shy furnace
#

like how do I learn that

#

if they dont give good examples

brazen hornet
#

guys I have a question if I’m making a horr game should I watch yet videos just about that genre of scripting or no

twin basin
#

basically...

twin basin
somber vault
zenith shore
# shy furnace its parameter example

Functions are blocks of code which can be used by calling its name
local function nameHere()
-- code
end
local - scope
function - keyword, tells the script it is a function
nameHere - the name of the function
() - you can put arguments (variables) inside, every function needs this, can be left empty
end - the end of the function

How to call it:
nameHere()

twin basin
twin basin
shy furnace
#

just like the code

#

or parts of it

#

or what

zenith shore
#

yeah, code

shy furnace
#

srry im such a casual

somber vault
acoustic umbra
twin basin
zenith shore
#

we use functions so we don't have to copy/paste the same code everywhere, and also it helps organise the scripts

acoustic umbra
#

do you mean something like alignType?

shy furnace
#

there like stuff u put inside the ()

zenith shore
#

(), we can put variables such as (coins, points)

shy furnace
#

at the end of the function

shy furnace
#

in like a normal code

twin basin
acoustic umbra
zenith shore
#

if you have variables inside the (), then when calling it you need to put variables aswell:
local function test(coins)
print("You have "..coins.." coins!")
end

-- calling the function
test(5)

#

Hope this explains it

shy furnace
#

like

#

well I get it

#

just dont know when you would use it

twin basin
#

i gtg sleep now

zenith shore
shy furnace
#

lol

zenith shore
#

In more advanced codes it wont be a print statement

shy furnace
#

yeah im just not advanced enough to understand

somber vault
shy furnace
#

ty for your help

shy furnace
zenith shore
#

And why would I use it?

#

It's not a string in the first place

somber vault
#

still

#

its good for checking

zenith shore
#

No

#

You don't use tonumber()

#

You only use it if it is a string

#

You use type(coins) == "number"

somber vault
#

oh right

#

oopsies

zenith shore
#

It's ok

somber vault
#

have you learned types of values?

warm nova
#

MAAAN I CANT TAKE THIS ANYMORE

#

I CANT MAKE A "STEAL A" GAME

shy furnace
warm nova
#

WHHY ARE THEY EVERYING LIVING GOD DAM THING

somber vault
warm nova
#

ALL THE IDEAS ARE TAKEN

#

I CANT DO STEAL A NOTHING

shy furnace
zenith shore
#

Then make a "Build a ..." game

warm nova
#

omg

zenith shore
#

Wait

warm nova
somber vault
#

make a Eat A Cat

zenith shore
#

Steal a nothing

warm nova
#

i want to make my steal a game interesting

zenith shore
#

There you go

warm nova
#

like u steal a gun

somber vault
#

Steal A Neuron

shy furnace
#

Game ideas are so easy

warm nova
#

and that gun can be used

#

to shoot plrs

zenith shore
#

Steal a nothing, where you can steal different types of nothings

shy furnace
#

its just copy and paste of trends with some dumbass theme

somber vault
zenith shore
#

Steal an element

shy furnace
zenith shore
#

Steal a tree

warm nova
#

hmmmhmmmm

#

am i cooking chat

shy furnace
somber vault
warm nova
#

lemme search and see if they have any

zenith shore
#

Steal a meme

warm nova
#

no steal a free model games

shy furnace
warm nova
#

here i go guys wish me luck

#

im still making my horror game

zenith shore
#

Steal a brand new v12 4 wheel 4 door 1000 horse power BMW

warm nova
#

but i wanna see how long its going to take for a steal a game to blow up

somber vault
#

anyways i gtg

shy furnace
#

or am I jjst dumb

somber vault
#

you could

#

you can do anything you want

#

there is also tostring

zenith shore
#

just do

somber vault
#

but i gtg so bye everyone love you mwah x

shy furnace
#

how does it know if u have 5 coins

#

leaderstat?

shy furnace
somber vault
zenith shore
#

coins = tonumber(coins) or type(coins) == "number" and coins or 0

#

simple

shy furnace
somber vault
#

anyways i gtg like really

#

so goodbye guys

shy furnace
#

cya

somber vault
#

goodnight

shy furnace
somber vault
#

ok

#

now imma stop talking

#

GOODNIGHT

shy furnace
#

gn

shy furnace
warm nova
#

steal a sword

#

is my work now

#

any modeler here?

warm nova
#

NOT GON LIE

#

/STEAL A WEAPON

#

/IS FIRE

hardy stone
#

is this bad /unoptimized code? (its a clan rolling system 😭 )

local player = game.Players.LocalPlayer


clanroll.OnServerEvent:Connect(function(player)
    local rngClan = math.random(1, 1000)
    print(player.Name, "Rolled Clan")
    print(rngClan)
    
    --rolling loop
    if rngClan == 1 then
        print(player.Name, "rolled TSUGIKUNI")
    elseif rngClan >= 2 and rngClan <= 6 then
        print(player.Name, "rolled KAMADO")
    elseif rngClan >= 7 and rngClan <= 31 then
        print(player.Name,"rolled TOMIOKA")
    elseif rngClan >= 32 and rngClan <= 82 then
        print(player.Name, "Rolled RENGOKU")
    elseif rngClan >= 83 and rngClan <= 213 then
        print(player.Name, "Rolled KOCHO")
    elseif rngClan >= 214 and rngClan <= 414 then
        print(player.Name, "Rolled UROKODAKI")
    elseif rngClan >= 415 and rngClan <= 1000 then
        print(player.Name, "Rolled HAGUNEZUKA")
    end
    
    
end)```
warm nova
#

STEAL a Weapon

#

ignore the avatar

#

peak gameplay

obsidian loom
# hardy stone is this bad /unoptimized code? (its a clan rolling system 😭 ) ```local clanrol...

It's not bad, but you can optimize the if-else statements to make your code less verbose. one way of doing this is by reversing the priority of the rolls:

if rngClan > 1000 then
  -- do something
elseif rngClan > 414 then
    print(player.Name, "Rolled HAGUNEZUKA")
elseif rngClan > 213 then
  print(player.Name, "Rolled UROKODAKI")
...

This makes the if-else conditions less verbose, but there's actually an even more elegant solution to optimizing this if-else statements, and that's by using tables. You can store the data in a table like this:

local clans = {
    {name = "TSUGIKUNI", max = 1},
    {name = "KAMADO", max = 6},
    {name = "TOMIOKA", max = 31},
    {name = "RENGOKU", max = 82},
    {name = "KOCHO", max = 213},
    {name = "UROKODAKI", max = 414},
    {name = "HAGUNEZUKA", max = 1000}
}

and you can maybe see how you can write some code to get which clan the player rolled given this data.

In my professional opinion, using tables are much better because you can easily add other clans down the line without modifying too much code.

edgy mango
#

local random = math.random("A", "B, "C", "D")
print(random)

can someone tell me how I can make it print something random every time?

bright ibex
warm nova
#

what

warm nova
bright ibex
#

borrowed

#

ok

warm nova
bright ibex
thorn arch
#
local characterTable = {"A", "B", "C", "D"}
print(characterTable[math.random(1,4)])
slim tinsel
thorn arch
slim tinsel
thorn arch
#

Yep

#

But you didn't index the table to get the value when printing, you just printed the random number

slim tinsel
#

ah shit

#
local characterTable = {"A", "B", "C", "D"}
print(characterTable[math.random(1, #characterTable)])```
#

can be done like this so that way you dont use a set number unless you want a set number

thorn arch
#

Yh

spare ocean
#

local characterTable = { "A", "B", "C", "D" }
local choice = select(math.random(#characterTable), table.unpack(characterTable))
print(choice)

spare ocean
#

lmao

slim tinsel
#

waste of coding 🥀 💔

spare ocean
spare ocean
slim tinsel
spare ocean
#

for fun tbh

shy furnace
#

Im new to scripting but why doesnt this work?

local ProximityPrompt = script.Parent
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer

local function OpenGUI()
    local playerGui = LocalPlayer:FindFirstChild("PlayerGui")
    if playerGui then
        local screenGui = playerGui:FindFirstChild("ScreenGui")
        if screenGui then
            local frame = screenGui:FindFirstChild("Frame")
            if frame then
                frame.Visible = true
            end
        end
    end
end

ProximityPrompt.Triggered:Connect(OpenGUI)```
spare ocean
# shy furnace Im new to scripting but why doesnt this work? ```lua local ProximityPrompt = scr...

use this local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local prompt = workspace.Part.ProximityPrompt

local function OpenGUI()
local playerGui = LocalPlayer:WaitForChild("PlayerGui")
local screenGui = playerGui:FindFirstChild("ScreenGui")
if screenGui then
local frame = screenGui:FindFirstChild("Frame")
if frame then
frame.Visible = true
end
end
end

prompt.Triggered:Connect(function(player)
if player == LocalPlayer then
OpenGUI()
end
end)

spare ocean
shy furnace
#

doesnt work

#

oh

#

wait then will it open the ui for everyone else?

spare ocean
spare ocean
shy furnace
#

yeah

#

so I have to make a normal script tell a local script to open the ui?

spare ocean
#

local prompt = script.Parent
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local remoteEvent = ReplicatedStorage:FindFirstChild("ShowPromptGUI")
if not remoteEvent then
remoteEvent = Instance.new("RemoteEvent")
remoteEvent.Name = "ShowPromptGUI"
remoteEvent.Parent = ReplicatedStorage
end

prompt.Triggered:Connect(function(player)
remoteEvent:FireClient(player)
end)

shy furnace
#

okay

spare ocean
#

server script

#

local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local remoteEvent = ReplicatedStorage:WaitForChild("ShowPromptGUI")

remoteEvent.OnClientEvent:Connect(function()
local playerGui = LocalPlayer:WaitForChild("PlayerGui")
local screenGui = playerGui:FindFirstChild("ScreenGui") -- your GUI name --
if screenGui then
local frame = screenGui:FindFirstChild("Frame") -- your frame name --
if frame then
frame.Visible = true
end
end
end)

#

there

#

those should work

shy furnace
#

also why does this code below some times say
ServerScriptService.CoinGiver:5: attempt to index nil with 'FindFirstChild'

local Players = game:GetService("Players")

local function CoinLoop(player)
    local leaderstats = player:FindFirstChild("leaderstats")
    local Coins = leaderstats:FindFirstChild("Coins")

    while true do
        Coins.Value = Coins.Value + 1
        task.wait(1)
    end
end

Players.PlayerAdded:Connect(function(player)
    CoinLoop(player)
end)
spare ocean
#

this the problem local leaderstats = player:FindFirstChild("leaderstats")

shy furnace
#

yes

spare ocean
shy furnace
#

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

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

local coins = Instance.new("IntValue")
coins.Name = "Coins"
coins.Value = 4
coins.Parent = leaderstats

end)

#

this is my leaderstat script

spare ocean
shy furnace
#

everything works

#

tysm

spare ocean
#

2a

dusk iris
#

when do i use oop

delicate moat
#

is it

rotund pawn
#

What would be an easiest way to implement Key-Binded abilities that unlock. In script way.

I was thinking to create module per ability & create server script that saved unlocked abilities, on playerjoin it sends client list of unlocked abilities => Show on GUI => On Specific key press, server checks if ability is owned, if TRUE => Do ability
Is there any easier way?

warm nova
#

when u can ask about how good i am at making peak?

rotund pawn
#

Cuz I want my code to be optimised.

warm nova
#

whats important is me

rotund pawn
#

I am trying to figure out if that is supposed to be somehow funny

sudden loom
fair copper
#

then u can make a ui for client sided things and players can also change those keybinds via userinputs etc

#

or not

rotund pawn
#

The thing is I do not want to spam server with every input, so create local array ofunlocked abilities <> keybinds and detect them if unlocked seems like the easiest way to me

ruby iron
#

just dont send the activation event to the server on every input lmao

#

have a debounce

fair copper
#

yeah the essence of every combat system is having a debounce for everything

kind pond
#

Anyone want modelling lesson

#

30 dollars per lesson

#

Can negotiate

kind pond
rotund pawn
# ruby iron wym

isAbility1Unlocked = true

On key presssed:
if isAbility1Unlocked & keyPressed = E
Send remote > Server checks if really owned

ruby iron
plain jetty
#

hi someone is advanced scripter for cheap price? i can pay in robux i need fix 1 hard thing

serene fractal
plain jetty
#

yo i need fix one bug i can pay in robux

fair copper
#

whats happening

eager yew
#

how to add a toggle to my OTS system so it can switch to FPS if i press a keybind

#

and vice versa

fair copper
#

on client

#

have keybinds stored in replicatedstorage?

#

something like that

zenith shoal
#

Wsp jow to hire?

subtle sage
plain jetty
maiden cloak
#

does anyone maybe know why when i load a players character one of the players PlayerGui doesnt exist or create itself?

rotund pawn
#

If I use local script to change size of part, when the part has server script that detects Touched event, will it get triggered if client's part is bigger?

#

Touch point is away from default server size of part

thorn arch
delicate moat
thorn arch
delicate moat
thorn arch
delicate moat
#

alright nevermind then

hollow dew
#

is anyone here a experienced scripter who can help me out dm me

vivid solstice
#

women in stem🩷🩷🩷

rotund pawn
thorn arch
#

Or use a magnitude check

rotund pawn
#

So basically creating 2nd hitbox for players with ability and filter touch event?

tawdry ice
plain jetty
#

i need someoen who make me advanced firstperson like the mimic i can pay in robux

peak cave
fair copper
subtle sage
peak cave
peak cave
#

adjusted the terrain to the heigh

#

the math noise is not really random

#

its fully dependent on the seed

#

only thing thats random is the seed

subtle sage
#

so it can just go from really high to like bottom?

subtle sage
peak cave
#

yes

subtle sage
#

oh

peak cave
#

its exactly same with how minecraft generates its world

zenith shoal
#

guys should i trust him

subtle sage
#

THATS LIKE THE FAKEST ASS MESSAG

#

ILL WORK FOR U INSTEAD FOR 1.5K GNG

plain jetty
#

yo someone help me fix one script? i can pay

stone garden
stone garden
fair copper
toxic pasture
#

how do i do police lightbar system

midnight spindle
#

is this a wise framework idea chat

static coral
midnight spindle
#

which the modules are shared

hushed basin
midnight spindle
#

server and client got different places

static coral
#

oh ok

midnight spindle
uneven solar
#

in theory whom here is a scripter?
and has a will and free time?

hushed basin
silver parcel
#

can anyone help me? I need a system where if i equip a jar from my inventory, it then gets carried and held my my arms above my head. PLEASE DM ME @silver parcel megahappy

zenith shoal
plain jetty
#

someone help me fix mistake with moving camera on mobile devices? i can pay in robux

tiny pine
#

where do I start to become advanced scripter, I've wasted 3 years btw

plain jetty
#

ye

#

i'm trying fix it

stone garden
# plain jetty ye

we all know its chatgpt, i read it and there is more comments than code btw

#

even emojis bro

plain jetty
#

i didn't write it

stone garden
plain jetty
#

i did it

#

and i fixed

tiny pine
uneven solar
#

then whats wrong

tiny pine
#

I waited for someone to answer my comment loll

tiny pine
#

it get harder every time

stone garden
#

i can help

tiny pine
#

lemethink

#

I think I know oop but not well

stone garden
tiny pine
stone garden
tiny pine
#

table.concat table.unpack

#

well what's the hardest thing you learnt

stone garden
stone garden
#

i mean now its easy i understand how it works

tiny pine
#

inventory was pretty or too advanced though

stone garden
#

i did the programing, map build + UI + SFX

#

i m a solo dev

tiny pine
#

I'm impressed

stone garden
tiny pine
#

Oh you start from clothing designer?

#

for budget

stone garden
tiny pine
#

Ooo that was long journey

stone garden
stone garden
tiny pine
stone garden
#

yes yes, let me show you animations now

#

what do you think

#

took me 2hours

tiny pine
#

thats crazy work

stone garden
tiny pine
#

do you often devex every month?

stone garden
#

i pay 42% tax

uneven solar
#

woah

#

ok

blazing oasis
stone garden
#

i get at the end a good 3500 euro its good

blazing oasis
#

82k. a year

stone garden
blazing oasis
stone garden
blazing oasis
uneven solar
#

what games

stone garden
blazing oasis
tiny pine
blazing oasis
#

i said this guy does

tiny pine
#

oh yeah sory I misunderstood

stone garden
#

its not like i live in luxury guys

uneven solar
#

ye ok bud

tiny pine
stone garden
tiny pine
#

can you devex to crypto, sorry for too many questions

stone garden
#

i dont think so you cant do that

tiny pine
#

Oh wait only bank you can devex to

blazing oasis
thorn arch
stone garden
thorn arch
#

Crypto may not be the best option but it's better than leaving it to depreciate in value

#

Even if you invest in an index fund it's way better and safe too

#

Than leaving it in a bank account

stray sphinx
stone garden
#

no games haha

stray sphinx
#

What the flip

#

What clothes bro

stone garden
stray sphinx
#

But seriously thi

#

How long it take you to reach the milestone or wtv

stone garden
stone garden
stray sphinx
#

and ur 15?

stone garden
stray sphinx
frail stone
#

jst leave school atp 🙏

stone garden
stray sphinx
stone garden
#

my parents are gonna kill me if i give up

stray sphinx
#

Remember me from second grade bro

#

We used to have so much fun

frail stone
#

save 100k euros, go to some other cheap country

#

live for 200 years

stray sphinx
#

Tickling each other in the back of the class

stone garden
stray sphinx
stone garden
stray sphinx
#

Nah but 25m a year is crazy work for a 17 year okd

frail stone
stone garden
stray sphinx
#

While your at toss me some robux 🙏

#

Nah but gl on studies bro

stone garden
stray sphinx
#

Np

#

Ima go eat breakfast now cya

blazing oasis
craggy birch
#

guys i got a quick question . I want to make a brainrot game and i dont have any idea what should i make , anyone have an idea?

scarlet kestrel
#

Minecraft Terrain Generation

  • I want to create a terrain generation system like in Minecraft and a bunch of biomes. A huge map. But to achieve this, I need to prioritize performance. How can I optimize performance for such a large system?
distant bramble
#

waht is a fullstack scripter

snow mauve
#

How can I access the amount of players that are playing an external experience?

brave kelp
sweet surge
#

should i learn code by my self or find a teacher or a friend that know lua

stone garden
velvet parcel
#

in scripting what does return do and mean because idk what it does fully am new and could use the help

sweet surge
brave kelp
#

just start doing anything really

sweet surge
#

i felt stuck going into new topic suddently questionable funtion i don't know suddently pop up lol

uneven solar
#

dead chat

distant blade
#

Hey, how would you handle global temporary data? I want to make a automized code system where i can use an ingame command to generate codes with temporary usage / limited amount of uses. Would i need to use http for that?

twin basin
mystic panther
#

Hello, I’m a new developer, and I want to create my first combat system. I'm aiming for a Deepwoken/Apocrypha (can't wait for the RPG release) based combat system, so I had a few questions that would mean a lot if anyone could answer:

1. How should I handle states? (e.g., stunned, burning, swinging, etc.) Should I use a state machine? If so, how should it be structured and formatted?
2. For animations, should I make them in Blender or Moon Animator? More importantly, how do you make them transition smoothly, and how do you ensure weapons animate correctly with an attack?
3. How should I handle enchant logic?
4. Should I use raycasting, hitboxes, or another method for detecting hits, and how should I sync it with animations? And, what are the differences between the different methods.
5. How do you debug and test combat mechanics during development?

Again, it would mean a lot if anyone could answer some of these questions.

twin basin
#

urgurgurgu

mystic panther
distant blade
mystic panther
twin basin
craggy dove
#

datastores is literally enough lol

#

no need to message other servers

twin basin
distant blade
#

omg the heat is literally deep frying my brain. I completly forgot you can not bind data to a player in a datastore 😭

craggy dove
#

you can?

#

userid are unique

quartz harness
#

Guys can I get a help am begging dev am trying to make trap system when the player active it other players should get trap but for some reason the trap owner is getting trapped too how to find the owner of the trap and never let him get trapped ?

twin basin