#code-discussion
1 messages · Page 161 of 1
ohhhhhh
anyone want tutoring on modeling
lowk i could be done @kind pond
bro okay
for this just use physics
like bodymovers or w/e because it replicates on all clients
i think for this, u should constantly check with the server
like position etc
bodymovers are deprecated but im sure there are new things out there
blender?
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
yeah but ive done that before and when i use that on the server it brings back the problem of server to client delay so i figured id just create a sort of fake ball to put on the client side and update that on the players end
what you can do is
no no no the fake ball is more glitchy
^
use a packet module by suphi kaner
broooo are you sure those even work @fair copper
it'll reduce ur network lag and communication 10x
those what?
so best bet is to just stick with the slight delay for communication?
ill try that out ig where do i find it at
-- 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
Woah buddy
hear me out yeah these are all remoteevents but use binary decentralization
but i have no remote events on the storage
protobuf but for roblox?
its based on NET framework but its specifically for roblox yea
u just define data type
anyone want tutoring on modeling
DM me
like Vector3F32 n stuff stuff
low latency data
breaks down the server - client bandwidth by alot
yeah like u got tables n stuff
--[[
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]
]]
ima take a piss brb
stuff u can store based on the binary n serials
if im using Vector3F3 instead of Vector3, i can pass around +-16777216 numbers max min of data
not more
Yall know about fastcast right
like shapecast?
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
Ahh
yeah maybe i havent gone into projectile physics yet
but im sure it just uses raycasts in a better way
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
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
im pretty intermediate i wouldnt say im new but im trying to get more into the advanced side of things
fastcast just splits the ray into multiple pieces
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
i lowk havent script football yet
but a single ray would be more accurate than a volumetric one no?
how would u detect the collision of football with a single ray?
collision of football with what
with surrounding
Why don't we just rely on actual Roblox physics with actual BodyMovers and stuff?
because unreliable
theyre kind of janky
I mean i feel you a tiny bit but
i tried using linear velocity i feel like my settings were wrong slightly but when i set the y velocity it just didnt work
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
i dont got much experience with aligners but ill do some research on them
bodymover or not , you still need something to detect collision
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
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
yea implement this with a snapshot system and u r good to go
now that i said that, it seems actually awful
what is a snapshot system
this has some flaws
desynced ball
fuck why is this so hard
it stores streams of data, so u can interpolate and extrapolate with it
just make use of sent time
ohhh
and since the client is controlling the ball's movement u will need sanity checks n stuff
not really, oh actually yes
you predict the motion in client with sent time,velocity
it should be purely visual on client
i think this is an impossible problem
@fathom sundial there is something called an UnreliableRemoteEvent
maybe you can try using that?
unless ur tryna make too realistic football
is football soccer or actually like football
soccer
yep thats what u use with the snapshot system
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??
i think so but honestly atp im so confused just like you
yo i need someone who script me one script with vfx i can pay in robux
100 robux right?
right
no im not interested
ima look at it @sudden estuary
dude woah woah woah
woah woah woah
@sudden estuary best scripter ive ever seen hands down
no its not ym script
no?
its a open source from some hackweek ig
i think its made by some roblox staff ig don't remember well
dude thats crazy how talented these peoplea re
once u get the concept of it , its quite easy
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
lol
that's crazy! how high is your level?
dude obviously
too high
How differently and efficiently can people script a kill block?
is the most efficient way , running a ecs
if not whats better
this man's too powerful
yo actually thats such a good thought
what am i looking at?
touched is too bad
ye im debating about it now
i think just using a ecs for environmental damage is efficient enough
🥀 what rabbit hole
at me
.Touched and .TouchEnded
where t o find open source things
what
Where do i find cool open soruced thing like that tennis system
ig the devforum?
https://devforum.roblox.com/t/resources-from-the-roblox-creator-game-jam-2024/2860031
Hi Creators! At the beginning of the year, the Roblox Creator organization (the people that focus on building things for all of you creators!) got together for our second annual Game Jam. Everyone from engineering, product, design, art, and more spent a week in between our busy jobs to build experiences, assets, and plugins with Roblox Studio. ...
idk
obby voice lol
anyone here has experience with reverbing sounds in runtime
all of this for some fireflies
anyone know how to make a combat system and ai enemy
local hello = hello
if /yes then
hello
end
😭
guys do ya remember me?
who help me with learn script but free
how to make killbrick
me
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
ok
for add
ur in mobile?
pc
yes
Divyansh_Op25
ok
friend me
pls add
on robloxs
u have a tutorial named place?
what
wait i am joining
bro what are you guys on
i need learn script
i dont think u can rlly learn by just going in a place with someone but ok
GUYS IS A CHARACTER FLIGHT SYSTEM GOOD ENOUGH FOR THE HIDDEN DEV scripter apps??
Can someone make a discord box.
discord box
how the hell do you use remote events
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
use Mouse.UnitRay
cast a ray from UnitRay.Origin with direction UnitRay.Direction * Length
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
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
stats is a reserved keyword vro
you can just put prints all over the place there
remouve the "clicks and" and "rebirth and" at line 38 and 39 and try
any experts at equiping 3d armor to characters
is this ok for my game🙏
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
no
yeah no
it just fully release for 3 days give it a time
u should be saying that to yourself
looks good
gonna blow up
algorithm gona love this one 💦 👄🥵🍆
lol
can someone explain how "or" works when initialising a variable
i need someone to make a game with im making themap animating a lil bit and the characters (its a brainroot game )
very shorthand if statement
if you do
local variable = workspace:FindFirstChild("A") or worksapce:FindFirstChild("BB")
then variable will be whatever is valid first
if workspace:ffc("A") then
variable = workspace:ffc("A")
else
variable = workspace:ffc("BB")
smth like that?
yup its the same
wait icl thats rlly clever
this wouldve saved so many lines of code for me 😔
how does "and" work then?
0 & 0 = 0, 1 & 0 = 0, 0 & 1 = 0, 1 & 1 = 1
is it like a truth table or smth?
if both conditions then set that variable to the value, else
truth table for AND yes
u can use that logic in your code
if both are true it will just return the 2nd value
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 = {}
read about
truthey and falsey
if i spelled it correctly
dm me if u want lessons on modelling
also what is exponential backoff
when you repeat same process but exponentially increase the waiting time between retries
like 1-2-4-8-16 seconds.. etc
whats the benefit in increasing the time and why exponentially?
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
also is it better to add autosaving or should i just keep it for when a player leaves the server
?
auto saving is always good just as a precaution
it shouldnt be frequent tho
maybe every 2 mins
I would recommend every 60s
or just use profilestore and dont worry about data saving
I would recommend making your own datastore once you are skilled enough
why lol
i prefer use a datastore module that has been hard tested
So you can make custom stuff
yh so far ive just been using the classic api with no precautions or anything so ive been trying to make my own datastore today
?? what would u need that profilestore doesnt provide already
saving with retries ?
Does profilestore allow you to make custom OPP methods?
Anyone knows how create a world selection like this? Please help
just make the selection interface then teleport the player to selected world?
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
or are you asking about the interface?
why would u need that lmao just create normal methods
cant you just use a normal module script
it seems quite similar to oop
It's more practical for it to be combined
this my berwsion already i just dk how to script it or add more to the right
yh im not experienced enough with gui to be doing this sorry😔
these r my first two vfx but i have no idea on how going about scripting them someone pls help
:Emit()
r u a advanced scripter
i was wondering if u can give me insight on how to do it in dms but yeah
i’m trying to learn it how to do it myself
ok
is the right place to be in the dev forums
resources -> community tutorials
Is it better to use MemoryStoreService or DataStoreService for global leaderboards?
brawldev on youtube
put "battlegrounds" in the title
MemoryStoreService is lost on server shutdown or crash
and is stored in the memory of roblox cluster
that is distributed
very nice ui reminds me of pvz 2 haha
Someone help me i can pay in robux
can someone tell me how to do a ball system like blr ( the way the ball welds to ur feet)
what would you guys say is the best way to make projectiles like bullets or rockets?
did u learn from him?
@prisma gulch
yes
ahh how long ago
right now
i'm halfway through his advanced series its rlly rlly good
How can I add a debounce to my script so that when the player touches the block, they only lose health once every second
Last time I checked memory stores weren't for datasaving, best for short term data, or transfering
Gtg
Yeah i gotchu, Its a scrolling frame, the canvas position is then aligned to the relative position of the image, i prefer creating the instances, so that way you can index which one you want to scroll to, and when you press the next button or the previous all your are doing is changing the current index.
local debounce = false
part.Touched:Connect(function()
if debounce then return end
debouce = true
-- ...
task.wait(1)
debounce = false
end)
thanks man
I was wondering if anyone could help me figure out how I can learn to code Ive tried things but noting seems to work
tutorials, AI and tons and tons of trial and error
Anyone wanna work on a bleach game alongside 9 other devs
apparently brawldev on youtube but i’ve just been taking apart open source games from the dev forum
ya I heard he was very good i might try his tutorials
do u have any other experience in other roblox development
no I only do scripting
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)
Simulation UI World Events Dynamics.
hm
looking to start a new team, im a 3d modeler, if anyone is interested dm me!!
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
There's no standard price, it's all about figuring out how much the person you're going to hire is willing to go for
dm for builder
put steal a brainrot in the name
holy shit he figured out what velocity is (nice work im just jk)
someone help me fix bug i can pay in robux
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)
Brother, watch the video I just sent, it was just to see the progress.
there are several systems
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
anyone know how i could make the animations not be so messed up
that’s fucking horrifying
this odd tilt
why are you even playing crim for 😭
leave it like that ts so funny 😂
if i got chased by that i amm gonna run laughing 😂
that ain’t answer my question
lowkey been lookin for sm like this where do you find entire open source games
who an advanced scripter looking for sum work
Me
tween
having the explorer at the left has to be a crime
okay so i found out u needa use ui page something like that
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
does anyone need one of the best game dev physics math tutorials on youtube
what should i do to learn how to script from scratch
Use YouTube and search up lua tutorials
is the dev king good enough?
ya
Then learn how to use it on Roblox
tryna generate vegas 🔥
this is the array(its just flat with squares making it up and its a grid of 1s and 0s)
wdym by this 😭
its not the full map yet(its just the first result of what vegas actually owns vs the cities in the sides)
oh you mean like actual vegas
it was meant to be like 1:10
but i dont know anymore
i just mixed it up until it looked good
why does disabling mouse icon floods my output with errors when i stop a test
all the errors disappear when i comment this line
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
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!!!
budget? or do u pay in %?
what type dev r u?
i do everything , UI, Programing ( OOP ), Building, modling, SFX, VFX, look at this cool system https://streamable.com/91llxh
i m a solo dev
i need u
dms
is there going to be a noticeable performance hit from using humanoids for enemies in a tower defense game?
you can put a NumberValue inside the enemies for health
and an animator to run animations
???
😭
this server never fails to disappoint
does it even matter
0.2ms of ping extra
huge difference
idk tho
~200 humanoids should definitely be ok since like thats the normal max server size on a game so that means it should be able to handle that i think
I'm quite curious, is there a way to make like videos play in-game? Without it violating TOS. Youtube videos for example.
There's this feature released in Roblox a few years ago
It allowed you to play videos
Maybe try that out
Just think it could be a cool background thing to have TV's playing certain things.
Gettin good at coding ngl
how do i learn how to code from scratch and having never written a single code
Learn lua on YouTube
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)
idk, give up and keep the competition low ig
Any scripter wanna make game I already made like $1500 in a week from games but my scripter quit lmao
Yeah sure bro, I require 90℅ tho.
anything but learn scripting these days...
I mean im trying to rn but
maybe cuz it takes time to learn
its gonna take a while

are u in a hurry?
getting good enough to make a proper game takes like half a year
and this again depends on what ur making
no i take my time with it
tf is this
some kind of creature
you just havent updated yet
I'm recreating real life, so far 0.0000000000000000009℅ done, it's all about effort.
are you one of those people that worships celebrities?
is yt best way to learn scripting at the start?
no
the only celeb i really like is ariana grande
yuh yt explains the fundamentals quite well. if ur tryna get specific theory and tools then AI or dev forums/docs, (dont use AI to do the work for you, only theory)
alr whats something simple I could try to script but also challenging for someone whos new.
do youtube (devking and brawldev + some alvinblox) and then learn what you didnt learn on youtube from the forums and then kinda just play around with a bunch of random modules. this is how i learned coding lmfao
oh
hm
learn datatypes and basic stuff first, cframes, vector3s, functions, etc. then try to make something. cant do anything without the basics.
are there any games that teach u scripting
creator hub
not roblox games
hi datasigh
wsp
not much wbu
nm
well ik some basic I watched Brawl Devs 2 series
i have no idea what that is
wym by play around with modules?
like look at the code
just a scripting series on yt
you will see what i mean when you learn the basics and a bit more advanced stuff but yes look at the code
i loved using topbarplus
😍 😍 😍 😍
what are frameworks
i dont use knit, only remote events/functions
fusion for ui tho >>>>
and janitor/maid
hey, does anyone know how to change alingRotation pivot?
the wheel system was genius
thanks i stole it from gta 5
LMFAOOO i never saw that
the thing abt the tutorials is like it makes no sense when I would use them because they just add numbers together
what part are you on
Parameters
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
bro but like u use parameters for more then this tho right 😭
do you mean alignOrientation?
yes, sorry
Imagine using that as a function example 😭 The tutorial needs an upgrade
exactly lol
its not function example
tutorials def dont have good example of why you would use stuff
its parameter example
that what im saying
anyways thanks for talking with me i really look up to you!
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
it tells alignOrientation the attachment's center of mass, aka relative to what it should rotate around
basically...
By default its Enum.PivotType.CenterOfMass
but you can set it to Enum.PivotType.Attachment
just learn scripting fully, horror games include many 'genres' of scripting
huh, set what property?
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()
thats just showing how to change it in a script
alignOrientation.Pivot = Enum.PivotType.Attachment
what do I put inside of functions?
just like the code
or parts of it
or what
yeah, code
srry im such a casual
any code
i dont think that property exists
everyone starts somewhere
we use functions so we don't have to copy/paste the same code everywhere, and also it helps organise the scripts
do you mean something like alignType?
(), we can put variables such as (coins, points)
at the end of the function
ah alr so u put variables there
in like a normal code
you have to change it via script
yeah, i know, but editor completion doesn't show that option or Enum.PivotType
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
I still dont really get the point of parameters
like
well I get it
just dont know when you would use it
it only supports two values CenterOfMass and the Attachment
i gtg sleep now
With time you will come to realise the use of it
alr cus I just dont rlly see a use past print("You have "..coins.." coins!")
lol
In more advanced codes it wont be a print statement
yeah im just not advanced enough to understand
you should use tonumber(coins)
ty for your help
whats tonumber
I'm trying to simplify it for the guy
And why would I use it?
It's not a string in the first place
No
You don't use tonumber()
You only use it if it is a string
You use type(coins) == "number"
It's ok
dont use it but it would be used to get the number value from any sort of string value or wtv
have you learned types of values?
like boolean, string?
WHHY ARE THEY EVERYING LIVING GOD DAM THING
yes!
yeah yeah
Then make a "Build a ..." game
omg
Wait
hell nah
make a Eat A Cat
Steal a nothing
i want to make my steal a game interesting
There you go
like u steal a gun
Steal A Neuron
Game ideas are so easy
Steal a nothing, where you can steal different types of nothings
its just copy and paste of trends with some dumbass theme
retro themed games are pissing me tf off
ill steal you
Steal an element
lmao fr
Steal a tree
its making me bank rn tho
Steal A @zenith shore
lemme search and see if they have any
Steal a meme
no steal a free model games
oh so like if u had like 5 coins it would get u that number?
Steal a brand new v12 4 wheel 4 door 1000 horse power BMW
but i wanna see how long its going to take for a steal a game to blow up
"Coins: 5" -- tonumber would be 5
anyways i gtg
alr and then u would like print tonumber?
or am I jjst dumb
just do
but i gtg so bye everyone love you mwah x
ty for helping me
that or stats that dont show on the leaderboard
how does the script see how many coins u have?
access player and then the folder the values are in
anyways i gtg like really
so goodbye guys
cya
goodnight
@zenith shore how would I do this?
local script game.Players.LocalPlayer
ok
now imma stop talking
GOODNIGHT
gn
alr
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)```
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.
local random = math.random("A", "B, "C", "D")
print(random)
can someone tell me how I can make it print something random every time?
what
dudes doing everything but making games
i did not make this, i borrowed it
borrowed
ok
riiighhhhttt
no one reacted to it in the server, literal robots
Math.random takes 2 number inputs
local characterTable = {"A", "B", "C", "D"}
print(characterTable[math.random(1,4)])
just do
local characterTable = {"A", "B", "C", "D"}
print(math.random(1, #characterTable))
You forgot to index the table but yh
characterTable is defined as a table
Yep
But you didn't index the table to get the value when printing, you just printed the random number
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
Yh
what about this
local characterTable = { "A", "B", "C", "D" }
local choice = select(math.random(#characterTable), table.unpack(characterTable))
print(choice)
🥀
lmao
waste of coding 🥀 💔
am new to scripting
huhh
why would you do that
for fun tbh
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)```
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)
can't acces a prompt from a lcoal script
caus eu can't use a local script to call a proxi prompt
let the server script send info to open the ui on locla want me to give th esvript?
yup
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)
okay
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
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)
this the problem local leaderstats = player:FindFirstChild("leaderstats")
do u have a leaderstat?
yes
make sure its name is exactly like that
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
ok use this to replace this local Players = game:GetService("Players")
local function CoinLoop(player)
local leaderstats = player:WaitForChild("leaderstats")
local Coins = leaderstats:WaitForChild("Coins")
while player.Parent do
Coins.Value += 1
task.wait(1)
end
end
Players.PlayerAdded:Connect(function(player)
CoinLoop(player)
end)
when do i use oop
is it
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?
why ask this
when u can ask about how good i am at making peak?
Cuz I want my code to be optimised.
thats not important
whats important is me
I am trying to figure out if that is supposed to be somehow funny
who u feeling like?
ts random
just define abilities in a module and have a separate keybinds module
then u can make a ui for client sided things and players can also change those keybinds via userinputs etc
or not
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
wym
just dont send the activation event to the server on every input lmao
have a debounce
yeah the essence of every combat system is having a debounce for everything
What is so funny
isAbility1Unlocked = true
On key presssed:
if isAbility1Unlocked & keyPressed = E
Send remote > Server checks if really owned
have a debounce on the server and on the client
hi someone is advanced scripter for cheap price? i can pay in robux i need fix 1 hard thing
Hey king answer DMs 
yo i need fix one bug i can pay in robux
how to add a toggle to my OTS system so it can switch to FPS if i press a keybind
and vice versa
manipulate camera with keybind
on client
have keybinds stored in replicatedstorage?
something like that
Wsp jow to hire?
depends whats the bug @plain jetty
with camera
does anyone maybe know why when i load a players character one of the players PlayerGui doesnt exist or create itself?
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
If you use a local script to change the size of a part, it doesn't replicate
he's asking if touched replicates to server when client change the size and touches the area where the normal size didn't cover
It doesn't replicate the size change in the first place
Tell him straight up maybe he didn't know
That's what i said 
alright nevermind then
is anyone here a experienced scripter who can help me out dm me
women in stem🩷🩷🩷
How else can I do something like that? It will be used to detect touch of Coins, but the coins are moving, appearing, destroying...
I have ability that doubles the size of coin hitbox for player.
You do it on server
Or use a magnitude check
So basically creating 2nd hitbox for players with ability and filter touch event?
Or use a magnitude check
damagge
i need someoen who make me advanced firstperson like the mimic i can pay in robux
used math noise to create random height numbers
oh
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
so it can just go from really high to like bottom?
nvm
yes
oh
its exactly same with how minecraft generates its world
guys should i trust him
NO
THATS LIKE THE FAKEST ASS MESSAG
ILL WORK FOR U INSTEAD FOR 1.5K GNG
yo someone help me fix one script? i can pay
lool "master lua script"
alr dm
send me
how do i do police lightbar system
is this a wise framework idea chat
your serverside is exposed?
no this in the replicatedstorage
which the modules are shared
decent
server and client got different places
oh ok
how could i maximize this idea twin
in theory whom here is a scripter?
and has a will and free time?
theres no good or bad its whichever fits and u feel most comfortable with
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 
hahahahahha
I HAVE A SIMILAR SYSTEM OMG
someone help me fix mistake with moving camera on mobile devices? i can pay in robux
where do I start to become advanced scripter, I've wasted 3 years btw
busy alr
we all know its chatgpt, i read it and there is more comments than code btw
even emojis bro
i didn't write it
just ask chatgpt at this point bro
u scripter?
yea
then whats wrong
I waited for someone to answer my comment loll
struggle of learning new things
it get harder every time
last time I scripting was around 2 year ago so..
lemethink
I think I know oop but not well
u know how use tables?
yea
thats a good start
i have alot of system, we can call and show you how they work, maybe you will learn a new way idk
a hole inventory system, weapon equip and armors
i mean now its easy i understand how it works
inventory was pretty or too advanced though
https://streamable.com/91llxh some little build battle
i did the programing, map build + UI + SFX
i m a solo dev
I though you made it with other dev
I'm impressed
haha thanks, i like working alone, its not a budget issue tho, i m a clothing disiger
YES HAHA 2 years ago
Ooo that was long journey
no no i never spend a penny on roblox studio, i dont pay poeple
yea yea i make around 25m a year ( robux lool )
that was way more than good
yes
do you often devex every month?
i devex in avarage 6000 euro but i live in france so i get fced
i pay 42% tax
u earn 6k eurors every month
i get at the end a good 3500 euro its good
82k. a year
yes
.....
thats 25m so yea
lowk thought it would be more
what games
greedy people take cuts 😔
rip
you make 82k as 15 years old?
oh yeah sory I misunderstood
its not like i live in luxury guys
what do you usually buy with the cash that you devex
nothing, i live with my parents and i m still in shcool, i spend on crypto
can you devex to crypto, sorry for too many questions
i dont think so you cant do that
Oh wait only bank you can devex to
no
i wouldve said just save it
Best to keep it invested
w
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
… what games has bro made
i own 5 clothing groups
Holy shit bro pass me 500 robux so I can hire people for my game
But seriously thi
How long it take you to reach the milestone or wtv
serious
2 years
hell nah i m 17
Bro retired early
jst leave school atp 🙏
no never bro i m preparing for a master
Exactly bro
my parents are gonna kill me if i give up
Yo
Remember me from second grade bro
We used to have so much fun
Tickling each other in the back of the class
yes 😍
😭
how save 100K bro i live in france, i get hella taxed
Nah but 25m a year is crazy work for a 17 year okd
leave fr*nce
alr let me pack up
thanks men
same in england bro
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?
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?
waht is a fullstack scripter
How can I access the amount of players that are playing an external experience?
someone who can script frontend (interface / ui) and backend (pretty much anything else)
should i learn code by my self or find a teacher or a friend that know lua
i teach alot of people we can talk
in scripting what does return do and mean because idk what it does fully am new and could use the help
worth give it a try
if you can find someone who can review your code its for the best, but a great way to learn is to create projects you are interested in and build them
just start doing anything really
thanks man
i felt stuck going into new topic suddently questionable funtion i don't know suddently pop up lol
dead chat
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?
do you mean generating unique IDs?
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.
urgurgurgu
oh and quick add on, where should I start and how should I progress when making it (i.e animations > effects)
Yeah i guess. Like saving data like a datastore on a server across multiple servers
i'd use profile store. theres a good video out there that walks u through setting it up
httpService to generate IDs, messaging service to send info across servers
yerp
omg the heat is literally deep frying my brain. I completly forgot you can not bind data to a player in a datastore 😭
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 ?
i didnt really understand his question then


