#code-discussion
1 messages · Page 25 of 1
I could try figuring it out that way even if it takes a little longer
fair
Like I kinda get the concept behind basic raycasts
But the system they use in like
Melee systems and such
as ive said, roblox docs got u
Where it’s similar to a trail
with examples too
Is weird asf
lua's a weird language tbh
I can find devforum stuff but idk about roblox
thats also alright if the post aint too old
Roblox doc does a good job explaining it
But what if it’s something niche like the system utilizing the raycasts to make melee hitboxes work
Thats why you gotta do codewars, to build out your logic
Current Version: V.4.01 Stable (09/21/2021) Notice I will be releasing a new module with new features, including Shapecasting in the near future. Stay tuned! More information: Raycast Hitbox 4.01: For all your melee needs! - #1133 by TeamSwordphin Upgrading from 3.xx to 4.0 Please note that V4 is not backwards compatible with V3. There a...
and try to find a solution with your current knowledge
Something like this
2021
already a bad start
Old af
tbh im only learning scripting to become a solo dev on a game with fisch mechanics
Can’t find anything recent
fair enough, a game like that is fairly easy to script
Thats why you gotta implement it with your own logic
Would it work if u just made a tiny raycast at the start of the position and maybe have it extend to the position it will be in like a millisecond after
So like on a scale of 1/10 how difficult do you think it would be to try and make a game like Rofighters
Then repeat that for the entire duration of the attack for example
That’s the only logic I could think of that would work for it
No real clue though
If I had to make a hitbox system I personally wouldnt use raycasts tbh
I did it with overlayparams before
whats rofighters
It was pretty nice but hitboxes with raycasts seem more specific
Like if you wanted to target specific affected body parts
It's like a Roblox Tekken game
But with characters from different animes and stuff
Oo I see
Overlayparams is more general
quite difficult
Plus I’ve done it before so I wanted to see what could be possible
With other things such as raycasts
Imma just assume that's a 7/10
That's a bit demotivating
Nah dw just get to work
well depends on how complex you want it to be
@ivory lark print('{Joined.Name}Has Joined the Server')
Error
One step at a time
start out simple
you gotta use ` not '
Wat
pretty much means ur name
If it took them a dev team 2 years just to only finish 4 characters and then quit I think it'll take me forever
Don’t you have to do like an entire thingy to check if the player joins and loads in
Then get the name and print
game.Players.PlayerAdded:Connect(function(joined)
print('{Joined.Name} Has Joined the Server')
end)
Yeah that
thats mine but the print statement is an error
Shouldn’t you say
game.Players.PlayerAdded:Connect(function(Joined)
print(`{Joined.Name} Has Joined the Server`)
end)
there you fo
Player.Name and have a variable for the specific player that joined
Joined was a thing?
😭
it was because you wrote function(joined)
instead of Joined
yep, also you gotta use ` instead of '
yea its just a PlayerAdded event that prints out the player's username when they joined, Joined.Added pretty much means their username
That’s nice
this should work
@ivory lark what do u think about the logic though
For the raycast hitbox
Wait lemme pull up what I’m trying to achieve
I see the problem, what I did was right but I did a single quotation instead of the `
yup
thats hella cool
Random yt demo
There are a lot like it on yt
But I wanna achieve smthn similar
Trynna figure out how the raycast would work without the premade asset since most tutorials just use that instead
Getting this error from line five 20:14:12.429 Workspace.KillBrick.Script:5: attempt to index nil with 'Health' - Server - Script:5 this is the code KillBrick.Touched:Connect(function(Kill) local Humanoid = Kill.Parent:FindFirstChild("Humanoid") Humanoid.Health = 0 end)
I wish I could make stuff like that but i cant animate at all lol
yup
you didnt check if the Humanoid exists
umm ok
nah
just an if statement before chanfing it
Opposite for me at this point
i like to learn when sm1 teaches me and ill js tell him either way
to make sure it exists
Cuz I animate mostly
you want the fix?
we gotta cook up a game fr 😔🔥
i fixed it by myself
gj
without looking at what u said
k
I remember using modules to make an npc dialogue system
It was 🔥
It’s 3am rn tho I gotta go sleep
Im the goat at UI though
been doing Roblox Studio for three years now and im the best at UI
Working on a tycoon where every player will have their buildings on their plot of land saved in a table. These buildings are complex and will be represented as classes themselves. One of their attributes will be a relative c frame to origin on the players plot of land. Right now im trying to figure out what other attributes a building(represented as a base part or model) should have apart from its relative c frame. Any ideas
I dont take pictures of my work and I usually just delete it after, I can make UI for you though.
ye cook smth up rq
I dont really understand your idea here, could you elaborate?
alright
just anything to see your style
Whos trying to creat a naruto game with me
wb
start the timer now
Im looking for the required vectors rn
using vectors is already a W
im not really into ui so i just draw some simple assets & thats it
oh ok
ping me when ur done btw
when using oop, am i correctly extending the class?
I test it and it works but when i print the door (subclass of interactables), the function is not printed.
function Door.new(model: Model)
local self = Interactables.new(model)
setmetatable(self, Door)
--self.Description = "A sturdy wooden door."
self.IsOpen = false
self.Instance:FindFirstChild("InteractPart").ProximityPrompt.ActionText = self.IsOpen and "Close" or "Open"
print(self)
return self
end
this is what door prints
got it-
solution was to print the door class instead
What’s the worst case scenario if you fail to identify an attribute right now?
@ivory lark
I rushed it, used non-png vectors from google, didn't really try my hardest on it, but still kinda tried. This is what I got. Usually I pay a bit for vectors for commisions and the backrounds are also from google. @ivory lark
nothing bad
which data store should i use
Then don’t worry about it and just make your thing
Don’t predict the future because you’re probably going to be wrong
ProfileService
thats actually fire
normal ones
@ivory lark I tried remaking the code from earlier without any help and I did it first try
local killBrick = script.Parent
killBrick.BrickColor = BrickColor.new("Really red")
killBrick.Touched:Connect(function(kill)
local humanoid = kill.Parent:FindFirstChild("Humanoid")
if humanoid then
humanoid.Health = 0
end
end)
game.Players.PlayerAdded:Connect(function(Joined)
print(`{Joined.name} Has Joined the Server`)
end)
Why is a kill brick printing when a player joins the game
If you look closely, that code doesnt print a kill brick when a player joins a game, it prints out the players name when they join a server. That's what the {Joined.name} is for.

I jst started scripting today
.
Im not that good
U are goated buddy
keep grinding U will be a demon one day
thx
I believe in you
'preciate it
we need more cracked scripters
On the platform ngl
these noobs just don’t get anything
🙏
yea
Thats HTML and CSS, markup languages for web design.
Oh I’ve never heard of those
I dont have any backround in JS for Web Development
Pretty much just graphical languages, like Roblox UI design but in a programming language.
every website you visit is made of HTML for structure and CSS for design
that exists?
whats it called
I mastered both of those languages in a matter of a week
wow your goated
I’ve never been to a website
HTML is one, and CSS is the other, two different languages that go together pretty much, without HTML, CSS is nothing.
Thats interesting..
Oh I see
Its a part that if you step on, it deals 50% of the players HP.
Very based
?
good job!!
slash j
local script only works once and then breaks after death, already tried putting it in startercharacter sscripts, tried changing the variablers upon Player.CharacterAdded, nothing seems to work
any ideas?
What’s it do
Would making an obby be a good practice for a beginner scripter?
How do I delete a Game Experience?
why isnt sponsord experience appearing
il give some 200 robux just to fix this please
Guys, I am learning about datastores but I can't seem to get the code working, I understand everything and copied everything in the tutorial but it doesn't work, the code returns "nil", could anybody please help me figure out my error?: local DataStoreService = game:GetService("DataStoreService")
local killsData = DataStoreService:GetDataStore("Kills")
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder", player)
leaderstats.Name = "leaderstats"
local kills = Instance.new("IntValue", leaderstats)
kills.Name = "Kills"
local success, currentKills = pcall(function()
return killsData:GetAsync(player.UserId)
end)
if success then
print(currentKills) -- part where the code returns the value of "nil".
end
end)
It's returning nil because you have never used SetAsync to assign a value. Next, I recommend assigning the values to a table that can act as a cache to avoid datastore calls. Ideally you'd only need two datastore calls:
- one when the player joins the game; add the player's stats to the cache
- one when the player leaves; save their cache to the datastore
Note that with this setup, you'd have to update the player's cached stats rather than call the datastore every time.
What units exactly is vectorforce. Force calculated in. Because it's not studs per seccond
Newtons
Since studs are 0.28 cm and Roblox mass units are 21.952 kg i woud just need to divide studs per seccond speed by 0.28 and multiply the mass by 21.952 and multiply them together but it's still off
What are you trying to achieve rn
I want a rig to go to a certain point exactly in a seccond
For realistic movement. I use a vector field for pathfinding
Acceleration/ Velocity
Ah
yo, can you ask someone about this error because we are stuck due to this error, the sword is working (killing people) {"Failed to load animation with sanitized ID "} this is the erro which we faced previously
So what's off
It's kinda innacirate. What is acceleration of vector force?
Aka time it takes to reach full speed
someone?
You don't own the animation
its own by my group
Is the game owned by the group?
ye
Then press the error and tap give permission
Hi
OK backpacks do work on mobile
Backticks.
local force = VectorForce.Force -- Force applied
local mass = Part.AssemblyMass -- Mass of the object
local acceleration = force / mass -- Acceleration in m/s²
print(acceleration)
K so what do I do with acceleration
Smooth transitions linear movement, I still don't know how your calculations are off though
If it's jerky or jittery that's probably the reason
local direction = (NewCfr.Position.Position - CurCFrame.Position.Position).Unit
local speed = (Troop.Speed * (GridSize / Step)) / 0.28
local mass = Troop.Mass * 21.952
local requiredForce = mass * speed
Your multiplying mass by speed but force is mass times acceleration
Speed is the rate of change in position
Acceleration is rate of change in speed
yeah i get that wait
if i used this to get the acceleration woudnt it just be same?
local direction = (NewCfr.Position.Position - CurCFrame.Position.Position).Unit
local speed = (Troop.Speed * (GridSize / Step)) / 0.28
local mass = Troop.Mass * 21.952
local requiredForce = mass * speed
local Acceleration = requiredForce / mass
use irl acceleration formula
Requiredforce is equal to mass times acceleration
Acceleration = change of velocity ÷ time taken this?
yea
well time shoud always be 1 seccond
so i guess that is a constant
so all i need is a change of velocity
What if i just used linear velocity instead of Vector force
why are you multiplying mass by 21
because RMU is 21.952 Kg
what's that
roblox mass unit
because i want the mass in kg
it uses Newtons
it uses velocity
im struggling
MaxForce isn't what pushes it
in this came m/s^3
Velocity is what pushes it
yeah it uses velocity
LinearVelocity uses velocity
for body velocity you give it a target velocity
Vector force uses Force
how do i explain whats my problem to anyone
the lower the maxforce of my bodyvelocity is the higher the dogsh at the end
when you land your direction changes for some reason
and im not pushing the player with anything else
i tried removing the humanoid but that didnt help
theres nothing that could change the players velocity
its like wind or sme shit
but theres no wind
i even removed the velocity from bodyvelocity
the player juts changes direction when the max force is low
got nothing else to try even
Rowtons 💀💀 never knew they had a name
named after Risac Rowton
He formalised the discovery of Rogravity when a blocky apple fell on his Character.Head
Just create your own physics engine, fuck robloxs shitty ass constraints
How do I make an inf generating map
Hi
thats cooll!!
i know it may seem hard, but adds more realism. make a custom made language like BASIC a retro coding language fit with the theme
I could do that, but why?
nothin, i just thought for a retro pc requires retro programming lang 
anyways goodjob!
one question, how do you run the source code? my guess is that its loadstring or?
oh thats a plugin?
i thought thats a ui
MAKES MORE SENSE
custom script editor :o
thats honestly so cool
thats one way to skip making syntax highlighting 
you shouldd
Syntax highlighting wouldn't actually be that hard to implement with rich text
managing the explorer like its part of a folder directory
eh, for me no
if so, do you have any resources about that? interested in learning them
Not really, just the docs for string manipulation
I'm thinking about having it so that if you type out a line and hit enter, but don't specify a line number then it executes that code instead of writing it to the selected script
then I can catch the output and print it on the retro screen using LogService
yeah watch out
i didnt even notice that
now it really reminds me those ibm machines

reminds me of these
Typing in only a line number should fill the input line with whatever is in that line
that absolutely isn't open in my browser right now, and is NOT what made me want to make this



I'll make it not destroy whatever you're working on occasionally and then release it
how does it handle "long code"

like a line of code surpassing the width of the screen
Uhhhhhhh
I'm actually not sure, my guess is the text label for that line would shrink
That's exactly what happens
My plan was to make it spill over to the next line
15 goal = {
16 Vector16.new(100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100
1200, 1300, 1400, 1500, 1600)
17 }
Ideally this interface would encourage you to not write long as fuck lines that would go off the screen

yep
even devs need some break
wasnt there an mmo game made in BASIC
Or shit, just message boards or IRC kinda things
Sounds based, I’ll try to find it
found it
later added some ascii characters to make the "graphics" look more pretty
lol
Oh not quite an MMO
what would you consider it?
I’m not even sure what to classify it as
It is a singleplayer world generator management game
Maybe I should make something like BonziBuddy
and maliciously hide malware
something im working on
I'd dial back the amplitude or increase the frequency of your camera shake
what camera shake
Like around 13 seconds, when you click on the keypad
thou shall must blink!
hey guys help
Or when you clicked on a module of the bomb and the camera zoomed into it
there's some kind of spring-like action there and the frequency of it is a bit too low I think
wdym frequency
the zooming in or clicking part
or both
soo
Just make it faster, I mean
I have this little print thingy
Either faster or less intense
what do I write to make it kill me or smite me
The first step would be to get a reference to the character you want to smite
how do I do that
Lots of ways, here's an easy one
local players = game.Players:GetPlayers()
local character = players[math.random(1, #players)].Character
its a tween
This will get a random player's character that is currently in the game
so probably make it a tad slower?
I'm not gonna sugarcoat it but
ctrl+c
the one you saw was 1 second
now how do I kill the player
local humanoid = character:FindFirstChild("Humanoid")
if humanoid then
humanoid.Health = 0
end
mild dud
now how do I fix this
if credit_score > 301 then
== -- is equal to
~= -- is not equal to
> -- greater than
< -- less than
>= -- greater than or equal to
<= -- less than or equal to
what
thats honestly what im using if it should be < or >
Feels better
💀
You might have more luck with a spring module for the camera
you'd have more control over the behavior of it
nah, feels goodd i dont want to make it worse 💀
alr now how do I fix this
show code
credit_score = 300
print("Your credit score is : `" .. credit_score)
if credit_score > 301 then
print("Your did it!")
else
-- the other stuff
end
]
tbh idk whats the problem
oh wait, i just realized it now 💀
could it be this particular string
i thought it was the other person who sent the code
what is bro making
Hello
Who needs a Builder
somebody here expirence with scripting animatsion and npc and doing kind of tsb scripts
my ass
dude
if u have to explain this to someone
fuckin report them with underage
💀
Hey that’s racist
no its cybersecurity
If anyone needs there code debugged dm me.
Is there a way to disable clickdetectors? I have meshes that need to be in the same location and each mesh has a clickdetector, but if I set the maxactivationdistance to 0 it still doesn't work
player.Character:FindFirstChild("HumanoidRootPart")
look at what happens
Do HRP.CFrame = CFrame.new(Vector3)
instead of setting the position directly
like this ?
Replace Vector3 with the previous Vector3 you had set
dis
yep
hold on
Bro 💀
?
Do you have motion
I have a different type of
Motion 😏
🙏
anyone here make custom chasis? or know someone who does?
Yeah
vro I don't go to american schools
where I'm from that means nothing
yo i created my own syntax highlighting rules for VSCode that are inspired by (but obviously not a 1:1 match of) Roblox Studio's syntax highlighting. if I released this as a plugin on VSCode, would people use it? or do people generally not gaf?
Is it just the same thing but shinier

I don't know but why does it matter
if people would use a free plugin to slightly alter the appearance
the only thing that makes it novel:
you can use Rojo/Github but make your code look like roblox studio's code. There's also a semantic token I highlighted that isn't highlighted in roblox studio for types.
only matters if you care about the aesthetic/color of your code and you're already used to roblox studio but want to switch to vscode
I’ll use It
1 is enough for me
dm
No I mean why does it matter to you if people will use it
Yo guys
Check out my ice ability
I should put this in my portfolio
U guys like it?
hey does anyone have an idea of how the game gravedigger made their sprint system?
Can someone please help make A ai gk i have been trying so long🙏
Can you send me a video of it?
It seems to be a really basic sprint, what part are you confused about
hey guys
why do ppl use vscode instead of just using roblox studio
i dont get why
personal preference?
or are there advantages idk about
Hoe does a ai gk even work?
They dum
not worth the effort if no one will use
Well most visual plugins aren't worth the effort
I use neovim, try and wrap your head aroiund that
Mainly just the transition into sprint. It seems as though the speed of the walking anim is tweened to increase along with the characters speed and FOV and then the sprint is played. I've tried this however in order to increase the animation speed I would have to access the direct walk animation that the player uses which would require me to write my own movement script and it would be very invasive to the default controls.
AnimationTrack:AdjustSpeed
but I don't think I noticed that
only that they transition into a second animation at a treshold in a really rigid way
Ik but I have to use it on the direct walk animation instance for it to actually work, which would require me to mess with the default scripts
Mess with the default scripts then
can someone help me with my weapon system? Im already sitting here and searching the issue in the code for 2 hours and i just cant find it. can someone help?
Mainly access to tooling, and preference
Before you ask a question, please do these things:
- Post relevant snippets of your code
- Give the error or let us know that there isn't one
- Explain what the code isn't doing
- Explain what the code should be doing
how should i post 400 lines of code? And prolly also more scripts
// READ THIS:
Before asking a question on the Internet, knowing how to effectively ask a question will help both you and the person being asked. Something as simple as asking a question might seem trivial, but a lot of people do it wrong.
Please don't do it wrong. It gets tedious.
To summarize a few important articles:
http://xyproblem.info
The XY Problem is a very common problem among newer programmers. It stems from the Dunning-Kruger effect and the overconfidence of newer programmers.
Always include the original problem in your question, as well as your proposed solution. Chances are, yours mightn't work, which will waste both yours and everyone else's time if nobody knows what your actual problem is.
https://stackoverflow.com/help/how-to-ask
• Summarize your topic like you're talking to a busy college student.
• Do your research, because your question might've been asked before.
• Take your time asking. Take time to word your question so it's easily understood. Don't fragment your question into multiple messages, take your time writing it.
• Always include relevant info, like errors or a code sample. Do some basic print() debugging to find problematic code, so we don't have to stare at a 200-liner.
http://www.nohello.com
When asking a question, ask the question! Don't just say "Hello!" and wait for a response, simply ask the question instead. You may think it's impolite to do otherwise, but the recipient just wants you to ask the question. This is the Internet, after all.
https://dontasktoask.com
Don't "ask to ask" a question. Asking "Can I ask you a question?" is a huge time-waster. Just ask the question and you'll get a response much sooner.
Im making a script where if you press z and icespike spawns. Im done witht he script and i welded the primary part to all the meshes but it wouldnt work please help me no one wants to help me in CODE HELP
who can create grid placement system dm me!
dms
brooo give me that
i need that
I have a scrolling frame but I can't scroll down to add more UI why?
blud just use treesitter
What is tree sitter
fast syntax highlighting based on a parse tree isntead of regex
😭
wtf is this code
all it takes
ok it didn't work for some reason but you get jist of what I'm doing
Didn't like
why not
it can be boiled down to "ooh shiny"
Why not just loop through the playlist?
haven't messed with loops a lot so I'm not really sure
I'm aware they exist I just haven't experimented with them yet
local Tracks = workspace.MusicPlaylist["Music randomizer playlist"]:GetChildren()
for _, Loop_Track in Tracks do
if not Loop_Track:IsA("Sound") then continue end -- If it's not a sound, this loop would break. The continue key word skips the item and moves on to the next.
Loop_Track.Volume = 0
end
Loops are relatively easy. The syntax is tricky for first timers though.
I need help
The gui woudlnt go visible
local DamagePart = IceSpike:FindFirstChild("PrimaryPart2")
GUI.Visible = true
task.wait(0.5)
Humanoid.WalkSpeed = 16
Humanoid.JumpHeight = 7.2```
Its in a local script in starter player its an ability script
anybody tryna make a 2 player obby with me, im honestly just bored and tryna find sum to do
dm i might have something you can work on
alr
k
works pretty well seemingly (needed some tweaks to fit into the script ofc though)
I'll look into loops later since there's a certain thing I'm planning that needs them
Glad to hear! Generally speaking though, you can't just plug in some code from Discord (or anywhere else) and expect it to work. Good job on changing it to fit within your code.
for some reason this Remote function is returning the value of plr1 twice instead of plr1, plr2
does someone knows how to fix that
Its a free model what'd you expect
i checked on the client and plr1,plr2 values are both being printed fine
You are probably passing plr1 on the client as well
Which you shouldn't be, it is done for you so you just need to reference it on the server
oh
I mean yeah but like
man I've been coding for like maybe 2 days and I know better than this 😭
comical levels of incompetence
tysm friend, i knew it was a dummy problem XD
yo, can you ask someone about this error because we are stuck due to this error, the sword is working (killing people) {"Failed to load animation with sanitized ID "} this is the erro which we faced previously
?
ok so'
im making a script where when i step on a button i get cash and theres a multipler and whn i press play it just startes going up and whn i step on it nothiing happens
it just keeps going up
heres script
local button = script.Parent
local playersService = game:GetService("Players")
local function checkPlayerOnButton()
while true do
for _, player in pairs(playersService:GetPlayers()) do
local character = player.Character
if character then
local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
if humanoidRootPart then
if player.leaderstats.Cash.Value >= 100 then
player.leaderstats.Cash.Value = player.leaderstats.Cash.Value - 100
player.leaderstats.Multiplier.Value = player.leaderstats.Multiplier.Value + 1
end
end
end
end
wait(0.25)
end
end
checkPlayerOnButton()
No where in that script do you check for pressing on the button
you have to call the function when the part is getting touched or remove the wait() and add a while task.wait(0.25) do loop which triggers the function
ok
for m1s do i put the 2nd m1 in action2 or all m1s in action?
is there a way to put a particle emitter in top of a part?
I want it to appear in top of every face of the model, not just on top. I need it to be similar to billboards on top property
Guys help me,i need to make a fuel system for my cart,so when it throttls it loses fuel,but the problem is that my cart reaches speeds highter than the speed limit and then stops decreasing the fuel pls help
What do i do if my dog ate my roblox studio
Your repeat loop stops when your velocity goes past MaxThrottle, so that is intentional, no?
does anyone know roblox api and python, quick job
guys
elseif restrictedAction == "walk" then
local conn = RunService.Heartbeat:Connect(function()
if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
if player.Character.HumanoidRootPart.Velocity.Magnitude > 1 then
eliminatePlayer(player)
end
end
local humanoid : Humanoid = player.Character:FindFirstChild("Humanoid")
local conn = humanoid.StateChanged:Connect(function(_, newState)
if newState == Enum.HumanoidStateType.Running then
eliminatePlayer(player)
end
end)
end)
table.insert(eventConnections[player], conn)
is it better to use velocity or hmd statetype?
to detect running?
can someone help me on making it change colors when you touch it instead of changing colors by itself (2nd day scripting)
im so cute
your mom idiot
Tesseract : bit of advanced mathematics.
Ctrl + L
dont use repeat loops, they kinda suck for me atleast
how long did this take
More or less 2 days I'd say
how long have u been scripting damn
It's been a few years now, but it's only recently that I've started applying maths 🙂
Shit is clean
How do you apply math in coding btw
anyway to compare 2 dictionaries other than checking their respective keys and values?
Thanks 🙂 Generally using predefined functions such as math.?() and then applying general formulas in linear algebra, etc...
thats the most efficent method
HIRING A PROGRAMMER WHO KNOWS PYTHON AND ROBLOX API, DM ME. YOU WILL BE PAID USD
There is a way to use a mathematical transformation to reduce the entire dictionary to a single comparable value. Instead of iterating through keys and values, you simply compare two numbers, but I don't know if you're interested.
im interested
i've decided to use the key/value comparison but i'd like to know this too
Ok it's a method based on cryptography, it's a bit complicated at first, but if I explain it to you it'll be easy to understand, are you ready?
It is exceptionally better in 95% of cases.
The idea is a principle of hashing on 2 dictionaries, in fact instead of browsing the 2 o(n), we transform them into number which allows a direct comparison is o(1) the only problem would be the order is messed up, but otherwise here it is, I can give you a code if you want to exploit it
How do I shuffle a list
Depends. Do you need a basic shuffle or an optimized one that avoids bias?
yeh continue
You'd have to hash them every time you add a new element though
Avoids bias probably
You're right, hashing must be recalculated on every update, but in most cases, the trade-off is worth it. Unless you're modifying the dictionary thousands of times per second, the efficiency gain in direct comparisons outweighs the slight recomputation overhead.
So my game has 144 tiles(there are 4 of each card)
I will give u a exemple, wait me i make the code.
alr
If you want to avoid bias, Fisher-Yates is the best choice. It ensures every permutation has an equal chance, unlike naive shuffling methods that favor certain orders. Want a quick code example too?
-- FUNCTION: Turns a dictionary into a unique number (so we can compare it fast)
local function hashDictionary(dict)
local hash = 0 -- Start with a neutral value
local prime = 31 -- Just a random prime number to make things more unique
for key, value in pairs(dict) do
-- Convert the key and value into numbers (because we need math-friendly data)
local keyHash = tostring(key):byte(1, -1) -- Convert key into numerical form
local valueHash = tostring(value):byte(1, -1) -- Same for value
-- Mix both values in a unique way so that no two different dictionaries end up with the same number
local combined = keyHash * prime + valueHash
-- Apply XOR operation (basically, a smart way to mix numbers)
hash = hash ~ combined
end
return hash -- At the end, we get ONE number that represents the whole dictionary
end
-- FUNCTION: Compares two dictionaries instantly (instead of looping through them)
local function compareDictionaries(dict1, dict2)
return hashDictionary(dict1) == hashDictionary(dict2) -- If the numbers match, they're the same
end
-- EXAMPLES:
local dictA = {a = 10, b = 20, c = 30}
local dictB = {a = 10, b = 20, c = 30}
local dictC = {a = 10, b = 25, c = 30} -- One value is different
print(compareDictionaries(dictA, dictB)) -- true (same content)
print(compareDictionaries(dictA, dictC)) -- false (different content)
-- 🧠 EXPLANATION:
-- Instead of looping through every key and value to compare two dictionaries,
-- we transform each dictionary into a single number (its "fingerprint").
-- Comparing two numbers is WAY faster than comparing every single element.
-- The only downside? If order matters in your dictionary, this method doesn’t preserve it hehee
I've tried to make it as friendly as possible, so it should make a nice guide hehe
i was thinking of this lol
thank you nonetheless
Well, that's perfect. Glad to have helped. 
what is fisher-yates
Anybody tryna make a game with me, its a simple idea and I think it has potential (im broke 😭 so I can't pay you but ill give you half of what the game makes)
I'd like a sample pls
Ok wait i will give u what it is and some examples
thx
isnt this hard to add tho
no
Well so the definition
Fisher-Yates is an algorithm used to shuffle a list randomly and without bias. Here's a quick example: It guarantees that each element has an equal chance of being placed anywhere in the list, so thats all and now the code
-- FUNCTION: Fisher-Yates Shuffle (this will shuffle your list with no bias!)
local function fisherYatesShuffle(list)
-- Start from the end of the list and work backwards
for i = #list, 2, -1 do
-- Pick a random position in the list from 1 to i
local j = math.random(1, i)
-- Swap the current element (i) with the randomly picked element (j)
list[i], list[j] = list[j], list[i]
end
end
-- EXAMPLE: Let's shuffle a simple list of numbers
local myList = {1, 2, 3, 4, 5}
fisherYatesShuffle(myList) -- This will shuffle the list
print(table.concat(myList, ", ")) -- Prints out the shuffled list
-- EXPLANATION:
-- This method ensures every element has an equal chance of being anywhere in the list.
-- Unlike some simple methods that might favor certain orders, Fisher-Yates is fair and unbiased.
-- It shuffles "in place" which is also memory-efficient.
-- Same format as the old code I made, enough to understand, let me know if you have any questions.
thx
Your welcome 
hi
hi
for the list I just input all my cards or do I have to use integers
You can use anything in the list, not just integers. You can input strings (like card names), tables, or even custom objects. The shuffle will still work the same way, just as long as it's a list.
thx :)
np:)
who can help me make a buy script? ive made the buttons and all, and when i have 20 or less coins nothing happens when u click double buttons, when u have 21 u can just spam the button to get tons of clicks when u click the main button, any help?
Random.new():Shuffle(t)
Ignoring the cupboard model from toolbox, what do you think ab the combination lock system I made?
i like it. i'd suggest adding accessibility for small screen that wont be able to read small text
whats the best way to check constantly if the players hp is below a certain amount? runservice or for loop?
Yeah! I really focused on the mechanic
humanoid.healthchanged method
i like it all. it's just my suggestion
Thanks! I plan on doing animations for it and also, it will work with swipe not click
So you can rotate manually and then it snaps in place
i can see the vision
yea
so i should connect that with a function if the current hp is lets say below 60% the max then i can run a block of code
plr.CharacterAdded:Connect(function(char)
local hum : Humanoid = char.Humanoid
hum.HealthChanged:Connect(function(health)
if health < 100 then
hum.MaxHealth = 100
hum.Health = 100
end
end)
end)
change as needed
I can code anything for a few dollars! DM me with your idea!
Prismatic Flux V1.0:
Any ideas to add?
trying to change baseplate to green, why wont this work?
do baseplate.BrickColor = BrickColor.new("ColorName")
Thats sick
Thanks u 
ty ty
Clean as fuck
hehe thanks you 
I’m trying to make a 2 player obby with custom movements and rope constraints won’t work, any advice?
Starlink V1
y am i making a game called india tower defence
u should make ex plode India simulator
no india tower defence my shit building and modeling is sticking with the theme
anyone trying make a naruto game dm me
drip nuke on India simulator
revenge of pakistan
does anyone here own roblox games w/ some players?
how much code does this take?
i'm new to this scripting stuff i'm jsut curious and how long something like that would take
not much rlly
just knowing math and youre done
its making randomly generated parts around a sphere and then linking some beams between the parts
maybe connecting parts that are in a selected distance for the beams?
how do I fix this
what is the error?
I want it to kill me
oh nvm the error is remove the then
oh
else statements dont need an else
its if then/elseif then/ else pretty sure
the then there is not necessary because its its inside and else statement
hey guys how do I fix this
u never assigned the humanoid variable
humanoid just doesnt exist
how do I do that
second if youre trying to know every player’s credit score u got to either store somewhere inside the player or in a table inside the script
when you are doing local players = game.Players:GetPlayers() you are literally getting every player in the game
a humanoid is inside a single character, which is inside a single player
basically you are doing if humanoid(which doesnt exist) then do something end
you need to make sure the humanoid exists
now imma go sleep bye
local credit_score = 300
print ("your credit score is : `" .. local credit_score)
if local credit_score > 301 then
print ("your did it!") else
print ("Glorious emperor Mao has ordered your execution")
local players = game.Players:GetPlayers()
local character = players.character
local humanoid = character:FindFirstChild("Humanoid")
if humanoid then
humanoid.Health = 0
end
end
yandere sim code
Bruh I need a scripter I’m a builder I wanna make a story game with someone split the robux 50 50
what did yall do as a beginner to learn how to scirpt
show builds
documentation and literally just working on stuff, tutorials are not the way to go
yea i just got basic knowledge of variables and function but dont know how to actualy use them
to build a game
Has anyone got some free jobs I could do to improve my scripting
tutorials and courses justs ay "variables store stuff" then for 30 minutes start doing
"MyCoolVariable 🤓 = 69!! hhahah so funy!"
check out "myrobloxcoach" he's actually good
ik him
hes that one out of pocket guy
the 5 minute tut
🤣
need someone like him in my life
i js know he says crazy shit off camera
real
bro why are his eyes so far apart
Are there any like decent scripters here to help me w sum
robux?
Well I’ve got a good idea and I want someone to help me make it
Bc I can do ui and building
I want to offer 40% of the game to the scripter that helps me
It’s quite simple aswell not complicated stuff
hey
when i publish my from a testing place will it affect datastores
yes
from studio only
HELP
thats why you use documentation i just said it
thats the best way honestly
start kinda small like click to change something
hmm how do i do that
look up how to detect input and then youd find out its userinput service
userinput service documentation
poggin
Help me
I need to remove a touch interest in a tool
anyone need help ?
Hello he takes 1 days to make it.
anyone good at ui
do yk ui?
scripting UI or making it?
exporting from figma
dm
yea gimmie a sec im doing something srry
kk
VSCode extension to give roblox studio syntax highlighting is now Live. Note that it requires Luau Language Server, another VSCode extension, to work properly.
I can't post a link here but search Roblox Studio-Like Syntax Highlighting on VSCode, it's the first result by ThornHall. Code is open source
Can anyone help me, and tell me what issue is this? I want the mobile to go up, not the sides, also it seperates randomly..
we can't tell you
no script so
@obtuse escarp whats that script for?
no need anymore, someone helped me already
sliding, with keybind
@obtuse escarp u build rigth?
yes
@iron skiff did it help
yep figured it out ty
👍
ui
is there anything client side that an exploiter cant edit/access?
no
never trust the client
the saying goes
rate
since the player's camera orientation can only be edited client-side, i need to check a condition for when the camera needs to be changed, but checking it through the local script leaves it vulnerable to exploiter, thats why i need to check through the server somehow in the local script
why does it matter if they change their camera orientation
cause when they click something it teleports them, and their camera orientation changes to default
bro u gotta focus on making other stuff not exploitable
they can change their camera orientation either way
cause its the client
bezier curves are easy, show the code
Preloading of animations looks like a spawn anim lol
robux?
who is advance escripter here?
robux?
2 year
ho wmuch you can script?
anything u want
dm
Looks DMs
ur using tween?
No, I closed discord
Button triggered dropper isn't all that 💔
can someone help me script a timed obby
the timer and the displayed dude with time ona lb
@gentle halo
pretty cool!
is there payment?
someone is alr taking care of it
i need a few more thigns tho which would be paid
ok dm
Whenever I touch the part, nothing happens to my HP.
local killBrick = script.Parent
killBrick.BrickColor = BrickColor.Random()
killBrick.Touched:Connect(function(Kill)
local humanoid = killBrick.Parent:FindFirstChild("humanoid")
if humanoid then
humanoid.Health -= 10
task.wait(0.5)
end
end)
game.Players.PlayerAdded:Connect(function(player)
print(player.Name.. " Has Joined the Server")
end)
swap killBrick with Kill here
also
its "Humanoid"
not "humanoid"
@lean ocean Tysm
What is it and how does it work?
lol
it's a drawing system and i want to make brush strokes smoother
last circle pos - new circle pos
get distance
fill in distance with more circles
How are strokes placed onto the canvas?
Make the mouse periodically drop positions onto the canvas and then join them with Bézier curves to draw the actual stroke
i gotta google that
You could interpolate linearly instead, that’s much easier to do and would get this working quicker
Thanks man I appreciate I’ll check It out today
Yo guys
whats the best sandbox placement module atm
wat
Roblox sandbox games
use a sandbox placement module
so im asking which are the best ones currently
Yep!
Just learn more and more as you go
There is no best way, just improve at your own pace
when do u think i can start commisions
It depends on how much you'd charge and what you can do. You also need to find your niche. Do you perform back-end or front-end work? Just get a hold of the skill you want to market yourself with first.
hi who need a dev and scripter dm me. i am voluntary.
HELP NEEDED, i can’t find a tutorial anywhere. i’ve got a UI pop-up after clicking a mannequin where users can put their clothing asset id’s in and then it should display on the mannequin. I don’t know what logic is supposed to convert it from an asset id to its raw template id as it does automatically when you paste an asset id in the shirts properties field. ??
i know it's not that serious, but i don't get the anti-VSCode sentiment i've been seeing here? it's useful because it enables using Github and open source tools. granted you don't have to use VSCode specifically for that, but VSCode in particular has support for Rojo and Luau with the installation of two extensions. and now with the installation of a third extension (mine), you can make your VSCode look like roblox studio too. ok off my soapbox 😉
Yo does anyone here know how to code fps systems, im willing to pay cad or robux for it.
They're wastes of time
cut down trees, don't spend all day sharpening your axe
It probably took me an hour to get rojo and GitHub set up, I think that's more than worth it.
With that being said, it's not necessary for every project especially if you're working by yourself. More useful for teams
Rojo is a gateway to fiddling with your tools forever instead of making games
I wouldn't recommend it for beginner devs just getting started. I wouldn't recommend it for someone developing on their own who is just wanting to get their hands dirty making a game. For someone who knows what they're doing, it enables a lot of things that are useful for statistically increasing the quality of releases and reducing the likelihood of certain bugs.
I don’t use syntax highlighting, I don’t use autocomplete, I could do my work just as easily in notepad
I’m stronger than you and it shows

Most people who use VSCode do so because they’re embarrassed to be caught with Roblox studio open
I mean that's just flat out wrong but sure
Do you tell your tinder dates you make Roblox games, or do you say you’re a “software engineer”

Most of you guys are ashamed by what you do and will do anything to hide it
Lmao what?
Bruh I started learning roblox/luau as a side hobby 2 months ago. I worked at a real tech company for 5 years. Sit down
He’s just rage baiting you @carmine imp just ignore this fool 😭
True
You just proved my point
He’s obviously just picking at the littlest things to get to ya
you're both too polarized but this is entertaining to read
Name 1 thing I said that is polarized 😭
Bro don’t feed into this bs lmaoo
You worked at a “real” tech company so obviously you consider Roblox to be clown nonsense and want to minimize the pain you feel working on Lego games
you're too work in teams corporate brained and he's too "I hate all developer tools" absolutist
Nah, I consider it a side hobby for myself. It isn't a real job for me yet cuz I'm still making a game
I just don’t like letting the computer think for me, it makes me worse over time
Y'all are tripping, I literally said I wouldn't recommend it for several types of situations
Yeah and you also said you don’t understand the anti-VSCode sentiment
I don't
The only use case you’ve admitted it is worthwhile for is corporate drones producing corporate slop at scale
Have fun being interchangeable!
paying 10k robux for a rng game. dm
You've got a lot to learn. I won't hate you for being ignorant though.
Keep up the hard work, your boss will love his new yacht
fingeroo can you help
With what?
the canvas isnt appearing to server
local sharedEditableImage = AssetService:CreateEditableImage({ Size = Vector2.new(400, 400) })
canvasImage.ImageContent = Content.fromObject(sharedEditableImage)
-- Handle drawing submission from client
publishEvent.OnServerEvent:Connect(function(player, pixelBuffer)
print(player.Name .. " submitted a drawing")
print("Pixel buffer length: " .. buffer.len(pixelBuffer))
sharedEditableImage:WritePixelsBuffer(Vector2.new(0, 0), Vector2.new(400, 400), pixelBuffer)
end)
I assume pixelBuffer is a buffer?
this is the local script function
local function finishDrawing()
-- Read pixel data from the EditableImage
local pixelData = editableImage:ReadPixelsBuffer(Vector2.new(0, 0), Vector2.new(400, 400))
-- Fire RemoteEvent to send data to server
publishEvent:FireServer(pixelData)
end
So what's happening, the remote event never fires?
it fires, the debug works but there's no display
part > surfacegui > imagelabel
there's no error either
i dont think they replicate automatically
youll need to fire all the other clients with the buffer
and do it per client
So a player draws on the canvas, that player sends the data to the server, the server writes those pixels to the canvas?
yes
And then a second player doesn't see the updates?
nope, all players dont see it
Only the server sees it?
because it doesnt replicate between other clients or the server
nothing, there's no display at all
like i just said, send the buffer to all clients
Late ping, but I used to ‘do’ commissions without actually contacting the person
Basically, test that you can make a commission so you know that you can do others.
It’s good practice, and you can add it to a portfolio
so im gonna loop all players
RemoteEvent:FireAllClients()
yes, or just remote:FireAllClients(buffer)
ill try it
does it :Disconnect() events when object is destroyed?
for example MouseButtonClick and Image button - if ImageButton destroyed will it terminate event handler? Or I need to disconnect them manually to make memory free?
This is automatically handled by Roblox except in specific cases.
What is that specific cases? Can u tell about one or two examples?
If you keep a reference in a variable and the script runs even after destruction, it is possible that the connection remains active.
This is rare, although for ImageButton types it is usually not a problem.
oh, got that error once
thank you
Yeah it happens, your welcome 
how does ecs work on client
lets say each ship has a position, health, and velocity
how would players change their own ships, but the server still have information on all of the ships
if each player has to change the mover constraints on their ships, how would you create than in an ecs that shares it across server and client without an insane amount of extra networking needed
like it cant just be moving ships to places, it also needs to react to the players input
but if i make the server take player input, theres going to be latency and delay which is going to make playing the game horrible
So basically, you want smooth ship movement without crazy networking overhead, while keeping the server as the authority, right? Are you looking for a solution with client-side prediction and server reconciliation, or do you have a different approach in mind?
i mean what ive been doing is just having the client have network ownership and full authority over it, but i want a server-authoratitive ecs system
right now client sets the movers and everything on its own heartbeat so theres no input delay
but its nowhere close to modular
I think they want actual help
not just throw their message in chatgpt
yeah it did sound like a chatgpt message
but im the one asking for help so benefit of the doubt
This is the translation, as I am not English, I translate my French from English.
as i said benefit of the doubt
understandable
I'm not gonna take over the conversation here, but when you say ecs you mean entity component system, right? That's more of a game design pattern and less of a networking pattern
Afterwards I try to learn but we will have to get used to it. 
that is ok
yes i do mean that. yes its a game design pattern so i need help making it work with networking since its not designed to do that
all of the examples ive seen are always 100% server side
and i see people glazing it so much but i cant wrap my head around getting it to work in a context where its not just the server doing the work
(which is the context where an actual game works)
first and foremost
you plan to make the client spawn their own ships so that the server isn't replicating that information to them, right?
or at the very least have the client delete the ship the server spawns for them and replace it with their own
because basically, all you really need to do is have the server send information about each player's ship to everyone periodically
you can increase the interval between when the server sends data if you can implement a system to predict where ships will end up with decent accuracy on the client side
wait so then should i make the server system only to handle the AI ships
since all the other ones would be player ships
you still need an authoritative server
the best way to do that is to have clients send only their input data and have the server use that to control a server-only copy of the client's ship
Anyone trying to Naruto game
ohh but one of the components would be "isAI" and if its not ai then the server doesnt replicate that ship to the other clients? because the client that owns that ship is already replicating the ship on its own (with network ownership and all)


