#code-discussion
1 messages Β· Page 146 of 1
Send a SS
I think Ik why
I will dm you
Alr
I need the best scripter in the world I have a question
you have better luck getting an answer from god
yooooooooooo i fixed it guys
Can anyone tell me what this means? (red line)
hey so im trying to make a command line tool just for myself to bulk upload assets using the roblox api. I want to use oauth2 for the increased rate limit. Has anyone else tried to do oauth for a command line / local tool? I know that they require a ssl cert for the redirect link so i don't think i can redirect to a local web server on the device or etc. any help would be appreciated. I could just make a quick website to allow for this but feels overkill just for my usage. Im basically selecting a subset of images automatically out like a list of 10k and want to upload those to studio.
why are you redefining workspace when there's a global variable for it already?
I hadn't seen it, I deleted it and I found the problem but thanks anyway
;
lf someone to make a game with
can anyone help me why this aint working if im not allowed to send vids in here im sorry i didint know
?
alr
can you add me to your script
i mean experience so yes or no
I
meant
and its so clean too
wym
like share your experience with me i am try to fix it
ok how do i do that
add me first
DIVERDOWN_jojostand
i have a blackAvatar
blackavatar
and i meant
DIVER_DOWNJojostand
bro i am just tryna help
alr
you can go on a call with me i am show you that i helped people
its ok
and the only thing i am going to do bad is like learn from your script
what?
it was stand jojo
thanks bro
Hello code monkeys. Let's team up for Jandel's 35k USD game jam
Does someone know how to verify(by script) if a server was migrated?
i guess people making enemy AI with guns dont use raycast they just have a chance to automatically damage the enemy they are facing? to save resources because its server sided ai? but then how do they do the bullet hole vfx wouldnt they have to raycast anyways..?
i told you already man
Use TeleportService:TeleportAsync(placeId, players, teleportData)
Send {migrated = true} in the teleportData
Detect it on the new server using TeleportService:GetLocalPlayerTeleportData()
usually not
wdym? what do they do? arent raycasts expensive
Raycast just for
Bullet hole on wall
Tracer beam to look cool
Muzzle flash direction
Impact particles
just use scripting
own knowledge
Only raycast for VFX if a player is near enough to see the action
ight
how would yall make a vfx spin around the player for a skill lets say
what would u use
a script called Animate (inside the StarterCharacter or StarterCharacterScripts) to control walk/run/jump animations.
um i would say
Use a simple loop with RunService.RenderStepped or TweenService to orbit it
u can add to it also
if ever needed
@rich gust how long have u been scripting for?
2 yrs+
u got like
a template?
i need it for sumn
@rich gust Please stop showing toxicity. These people are new
where?
been nothing but nice and helping people⦠get thanked alllll the time.
thank you, mind your own buisness, showed nothing and i have a good reputation in discord in general, never been mean UNLESS they have started it first⦠i take things professional. thanks. 
Just giving a warning
π
It's never okay to throw a punch
Ok
yall how we can import roblox user avatar headshot to discord embed?
GetUserThumbnailAsync returns a Roblox CDN URL
so how to import it?
Getting the user's UserId
Using Robloxβs headshot thumbnail URL pattern
Passing that URL into a Discord embed (via bot or webhook)
i have a question
do rarities work by doing math.random and a specific rarity being within a set of numbers, so out of 100, 50 of that being common, 40 of that being epic, and 10 of that being legendaries
as an example
Is it better using an a* pathfinding than roblox pathfinding? roblox pathfinding gives so many problems
yo
local RaritySystem = {}
RaritySystem.Rarities = {
{Name = "Common", Chance = 99},
{Name = "Uncommon", Chance = 0},
{Name = "Rare", Chance = 0},
{Name = "Epic", Chance = 0},
{Name = "Legendary", Chance = 1}
}
function RaritySystem:GetRandomRarity()
local totalWeight = 0
for _, rarity in pairs(self.Rarities) do
totalWeight += rarity.Chance
end
local roll = math.random(1, totalWeight)
local sum = 0
for _, rarity in pairs(self.Rarities) do
sum += rarity.Chance
if roll <= sum then
return rarity.Name
end
end
end
return RaritySystem
here is a module you can learn from
and yes you were bassically right almost there
unless i dont understand something
.
quick question
when i asked about learning how to code
people said "watch tutorials on youtube or smth like that"
now i did, but what these gave me is only basics, i still cant make a script
and when i try to learn how to make smth specific all the videos are "DOWNLOAD THIS MODEL"
so where do i go to learn actually making the script
you cant keep following tutorials, code a project that matches your skill level and actually reason your way through it
the only way u get better at ts is if u get uncomfortable
An animator makes animations automatically replicate across clients right?
As long as itβs in the humanoid
yo im a 14 y/o builder and im looking for a scripter to just kinda be my partner u dont have to be really good u can be mid or kinda new and if we make a game that blows up u can get 75 % of the revenue hmu if u wanna talk
yes i ddint see humanoid part π
i was the one that said that
i literally studied programming by my own and now i work on myself earning 5k$ a month
i recommend suphi kaner he has videos on complex scripts using what youve lerant
you do coms?
or own games
no I am a full stack developer with knowledge of mostly required languages
its not about that I work on someone its about that I have creative ideas and then i turn them real
full time, self employed?
yes
awesome
currently applying on company
i mean they want me to apply
they called me
they are giving me 2k$ a month and in my country 2k$ a month is like 10k$ a month
wow i mean if the jobs good go for it
yea full stack developer with mild knowledge of some languages where i am advanced
they want intermediate html dev while i am advanced
i have learnt everything by myself without any tutors mentors or anyone
its about if you like somthing you will do it no matter what
@fossil bone
bro js said "advanced html dev"
well you motivatd me to keep coding lol
i have a question about displaying percentages
html is not advanced bro π
do you know atleast like what are frameworks
is it allowed to display the percentage of getting a specific rarity, then disdplay the percentage of getting that item under the percentage of rarity?
your too goated dude
react, vite
yea most of the programmers use word "advanced in html" while they mean they know frameworks
it is not required to say "i know vite react tailwind" and shit
well whats not allowing you? roblox π€£
or do i have to display the percentage of getting every item
yes
its in their rules to display percentages / odds for getting items in a luck based situation (from what i've seen)
well as long as your honest your golden i guess
dont get me wrong
i dont even understand ur question
let's say there's a 10% chance of getting a legendary odd, then it rolls inside of that odd for a specific weapon in that rarity caregory
so you buy crate > roll for odds of rarity> then it rolls for the specific weapon
yea so lets say theres odd for getting legendary sword then theres odd for getting leg axe spear or anything else right
yea
so its a rare case rolling for a weapon not a weapon with a rare roll on it?
yea i get it its easy to make
its just 1 case
it has like a 10% chance for legendary, 30% for epic, and 60% for common rarity for example
say ur a react/vite frontend dev not "advanced in html"
like what bro
after rolling for rarities, you roll for weapon
actaully you're right about that lets not argue over that I am just workin on my English
i dont know about you if youve played all star tower defense x they have literal slots in their game i think cases are soo hard to get punished on every game atp has a case system murder mystery for example
yeah but they don't roll for rarities first
im just doing this rarity system because the game i'm making has over 70 weapons
local lootTable = {
Common = {
chance = 50,
items = {"Rusty Sword", "Old Bow", "Wooden Staff"}
},
Rare = {
chance = 40,
items = {"Silver Sword", "Magic Wand", "Iron Spear"}
},
Legendary = {
chance = 10,
items = {"Dragon Axe", "Phantom Spear", "Blade of Light"}
}
}
local function getRarity()
local roll = math.random(1, 100)
local cumulative = 0
for rarity, data in pairs(lootTable) do
cumulative += data.chance
if roll <= cumulative then
return rarity
end
end
end
local function getItemFromRarity(rarity)
local items = lootTable[rarity].items
return items[math.random(1, #items)]
end
local function rollLoot()
local rarity = getRarity()
local item = getItemFromRarity(rarity)
print("You got a [" .. rarity .. "] item: " .. item)
end
rollLoot()
so i have to split it up, or just put 5-0.01% on each weapon
i know how to code it
its like a math basically
that is unorthodox but i think as long as the player knows what theyre buying ur good?
its just i'm asking if it's allowed
ok
why it shouldnt be allowed?
roblox opened the doors to child gambling fr
only regulation is when pop up screen shows up are you sure to buy it
oh
after you click yes doenst matter
i thought it was a set in place as a rule as due to some countries
nop
theres no rules or anythin
theres even no refunds on gamepasses
or anything like that
i'm probably just gonna split up the weapons throughout multiple cases then
after you are sure to buy it then there's no return
just to avoid the headache
bro just do that it's way easier
get a common rare leg create
crate*
yea
the only famous example is turkey banning roblox but that just means roblox is unwilling to set regulations
bro its turkey who cares
hey thats prob a large playerbase π€£
it is in the tos
okay brother and are you going to let uers know the odd of acquiring eat item? yes okay π
just make a question markk on buying gui and if you haver it says odds?
sure
js hop in ltireally any roblox game and see how they d oit
they usually have like 5-9 items per egg / case
you sound like person depositing house and title says "NO RETURN"
It doesn't say about use of odds, so technically you can make crate 499$ for instance and then place a marker on hovering GUI saying Leg Sword odds ( sword quantity divided by 100% )
id love to see a game go in the hundreds π€£ tbf black markets are already like that
chatgpt ahh
i am NOT going to write it on my own becuase of some random guy
i dont expect u to
i just like saying chatgpt ahh
bro fym chatgpt talk about rogueblox bein hard
but either way i cant believe people still ask for code which chatgpt generates first try
hwat
basically friend of mine who works in a private market company who gets 50k a month
says thati always use chatgpt but only thing is
when you use chatgpt atleast understand the code it gives you
if it works u dont have to
π π
i already am making a project, the thing is, what made me freak out is that ai's code doesn't work if its complex, tutorials are just (use my model) and dev hub makes my heart go /_/________
its not even a hard project, its a tower of hell replica but a bit larger and with abilities
you werent the first
will do

i created the best roblox inventory recode to exist π
heres the code if someone wants it
why not just have no text for extra it would look so much better
hardcoding that is aweseome tho
they were just tools called "Extra" to make sure the inventory layout was working π
i get your point tho
tysm
the UI is jut a temp design to make sure the system is working
aah ok
a
oops wrong chnale
mine
dragging took forever to code
I'm going to start a small and pretty simple roblox game. However I was wondering what's the best way to structure my scripts and stuff. Like what's the best way to keep my code organized? (Module scripts, folders, etc). Should I be using a lot of module scripts? lmk please !
depends
id have systems as their own modules
and folders are good for organization yes
For data saving, I think devs use pre-made data saving modules and stuff. Should I do something like that?
alright sounds good
profilestore
lol i was aboaut to type profilestore
yes profilestore, i also agree
Sup kiddos
do you guys also have any recomendations for youtubers who teach roblox scripting pretty well? like i know the basics but i want to refine my skills a bit more and learn more
profile store is the goat
brawldev
skidded
?
Did anyone elses goodsignal just... stop working today?
oh wait no something else broke
what the hell
i updated the inventory recode to now be able to drag entrys into the inventory/hotbar also made them dispear when dragging
NOW its the best recode π
also added search bar
π₯
keep grinding
Is it possible to create 4 separate cabin rooms in one server, where each player can only hear the voice when they are in the same cabin?
probably
how ?
what exactly r u trying to do
u want to make a player hear a sound but the same sound if theyre in the same room?
What I see is that for someone who wants to create a private room like this, they create a room on the same server but in a far away place / teleport in that place
yap
yeah thats like
super easy?
theres a million ways to do it
u can have the sound play locally and use areas to track it
u can just put a sound block in the room and have it trail off b4 the other rooms
bald
are you talking about voice chat
example u can see there is 4 room / cabin in this picture , I want the voices of people inside the cabin to not be heard by people outside the zone I circled.
yes
so the solution if i want create voice chat privately in same server , i create like teleport place for the player move to other room far from other player ?
ok so I do think there's a solution
this1 not work ?
so the new api let's you set the distance of the voice chat
you can customise that accordingly to fit in that room
how do i make it where my vip gives u stuff? anyone know
night
scripting
is there anyone whose mildly good at scripting who might be able to help me out with something
guys i got it
woah thats super cool whatt
clean anims n binary communication stuff wohooo
good job !!
do you think you could help me with something small whenever youre done
what is it
im trying to make a script that spawns a seat, and its like anchored to you so if you walk and bump into someone with the part then they sit on it and move around with the seat.
i got the seat to spawn, but the player is unable to sit on it and its really screwing with me and i dont know what im doing wrong
so its put in starterplayerscripts and the seat spawns in the workspace but is anchored to me. its not grouped with my player
ah so its just 1 script?
yeah
hmmm
Does anyone know why the table is always empty despite waiting for the script that populates the items to fire its completion event if the table is empty at first? local AllItemBoosters = RequestItemStock:InvokeServer("Luck Boosters"); if AllItemBoosters == {} then AllItemBoosters = BoostersLoaded.OnClientEvent:Wait(); end; print("All Boosters: ", AllItemBoosters, #AllItemBoosters); for keyName : string, boosterStock : Booster in AllItemBoosters do --print(boosterStock) CreateItemEntry(keyName,boosterStock); end
whats the state of ur seat's anchor
if its set to true players cant sit on it through ordinary means because roblox treats that as static
what happens when u try to sit?
AllItemBoosters == {} always goes to false
well when i walk over to someone with this part then it just touches them and nothing happens
instead of
if AllItemBoosters == {} then
it should be
if #AllItemBoosters == 0 then
or if next(AllItemBoosters) == nil then
but the 2nd one only for dictonaries ig
and uhh
Vibe code everyday
when u do if AllItemBoosters == {} then
it never meets the line
BoostersLoaded.OnClientEvent:Wait()
so ur script doesnt work
Yea cause each table has their own id
yeah
local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
-- UI
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "SimpleButtonGui"
screenGui.ResetOnSpawn = false
screenGui.Parent = playerGui
local button = Instance.new("TextButton")
button.Size = UDim2.new(0, 120, 0, 40)
button.Position = UDim2.new(0, 20, 0.5, -20)
button.Text = "Attach Seat"
button.Parent = screenGui
button.MouseButton1Click:Connect(function()
local character = player.Character or player.CharacterAdded:Wait()
local torso = character:FindFirstChild("Torso") or character:FindFirstChild("UpperTorso")
if torso then
local seat = Instance.new("Seat")
seat.Size = Vector3.new(0.633, 0.508, 0.702)
seat.Anchored = false
seat.CanCollide = true
seat.CastShadow = true
seat.Name = "WeldedSeat"
seat.Parent = workspace
local offset = CFrame.new(-0.1, -1.66, -1.1)
seat.CFrame = torso.CFrame * offset
local weld = Instance.new("WeldConstraint")
weld.Part0 = seat
weld.Part1 = torso
weld.Parent = seat
end
end)
the better logic towards checking if ur table is empty or not, is just checking its content and size
and u are missing the code that listens to the touch itself
ask son
it didn't work, the items didn't populate the gui
then theres problems with ur script.
other problems
i just told u what i see in ur snippet
troubleshoot it
find ur problems
it works in studio but not in gmae
then theres a flaw in ur script's communication
instead of race conditions why dont u use a remoteevent?
It is a remoteevent
local leftArm = workspace.NPCs.rizzlers["rizzler 1"]["Left Arm"]
local slash = workspace.Slash
print(slash.Position - leftArm.Position)
workspace.Slash.CFrame = CFrame.new(-0.18299102783203125, -0.4225959777832031, -0.7848434448242188) * leftArm.CFrame
slash.Orientation = Vector3.new(-28.1, 1, -119.9)
how do i make it if the leftarm changes orientation the orientation of the slash is relative to it so its infront of it at a fixed angle
hmmm
BoostersLoaded is a remoteevent that fires when the server script that defines the "Luck Booster" objects has finished defining and adding the objects to their table and returns the populated table
Even after the wait it still says the table is empty
It's there if the timing is bad and the serverinvoke ends up happening when the table isn't populated
use remoteevent for both request and response
i dont know the context of ur script
and idk
ur setting slash's cframe postion n rotation then immediately overwriting it with world orientation
lol
because the rotation is wrong
the world orientation is what i want it to be
but if the player rotates the rotation isnt fixed
i know
im asking for any solutions like how would i make it like that
nobody has given me a correct way to implement what i want
use a weld?
hmmm
is this slash part anchored
im going to try to use toworldspace
I think it reaches the :Wait() to the remoteevent after the remoteevent is fired, which means the check occurs before the table fully populates and goes into the wait after it finishes
stop mixing
invokeserver
with wait()
just use wait()?
the standard approach is
using remoteevent for both
like
BoosterEvents.RequestBoosters:fireserver() on client
BoosterEvents.RequestBoosters.OnServerEvent:Connect(onBosterreq) on server
smthn like that
it uses 1 re
so a remote event that is fired and then fires back
yeah same remote event dude
except it doesn't hold up the server like invoke does
just have a remote event name it whatever
yeah
it just listens for calls
so it'll focus on ur call
its the standard approach
because theres no race condition on it
race condition?
i hope u get the logic
ur previous method
made it like a race for ur scripts
so - a race condition
Lmao
because here
the client is listening for the response before it even sends the request yk
so it works..
hope that helped byebye
task.wait() 

Network.ApplyKnockback = Packet("S_ApplyKnockback",
Packet.Instance, -- The character part to apply knockback to (e.g., HumanoidRootPart)
Packet.Vector3F32, -- The direction of the knockback
Packet.NumberF32 -- The force of the knockback
)
really interesting way to replace remoteevents
a packet module
hey i have a doubt i just made a script which gives the player(imposter) a knife at night and it works but when we click on the knife it duplicates (only 1 time not more) at day 1 knife disappears and 1 remains we have to click on it to make it disappear can anyone find the flaw
local Lighting = game:GetService("Lighting")
local Players = game:GetService("Players")
local dayLength = 300
local nightLength = 300
local function isNight()
local time = Lighting:GetMinutesAfterMidnight()
return time >= 18 * 60 or time < 6 * 60
end
local function updateKnives()
for _, player in pairs(Players:GetPlayers()) do
if player:FindFirstChild("IsImposter") and player.Character then
local backpack = player:FindFirstChild("Backpack")
local starterGear = player:FindFirstChild("StarterGear")
local knifeInBackpack = backpack and backpack:FindFirstChild("Knife")
local knifeInSG = starterGear and starterGear:FindFirstChild("Knife")
if isNight() then
if not knifeInBackpack and knifeInSG then
local knifeClone = knifeInSG:Clone()
knifeClone.Parent = backpack
end
else
if knifeInBackpack then
knifeInBackpack:Destroy()
end
end
end
end
end
while true do
for i = 6 * 60, 18 * 60 do
Lighting:SetMinutesAfterMidnight(i)
updateKnives()
wait(dayLength / (12 * 60))
end
for i = 18 * 60, 24 * 60 do
Lighting:SetMinutesAfterMidnight(i)
updateKnives()
wait(nightLength / (12 * 60))
end
for i = 0, 6 * 60 do
Lighting:SetMinutesAfterMidnight(i)
updateKnives()
wait(nightLength / (12 * 60))
end
end
like this?
thanks droov
creative way to approach that
i would just
if humanoid and not seat.Occupant then
seat:Sit(humanoid)
end
obviously that is subjective as well
well im running into an issue now doing it my way
i need a remote event now, to make someone sit?
Someone please help me
hey i have a doubt i just made a script which gives the player(imposter) a knife at night and it works but when we click on the knife it duplicates (only 1 time not more) at day 1 knife disappears and 1 remains we have to click on it to make it disappear can anyone find the flaw
local Lighting = game:GetService("Lighting")
local Players = game:GetService("Players")
local dayLength = 300
local nightLength = 300
local function isNight()
local time = Lighting:GetMinutesAfterMidnight()
return time >= 18 * 60 or time < 6 * 60
end
local function updateKnives()
for _, player in pairs(Players:GetPlayers()) do
if player:FindFirstChild("IsImposter") and player.Character then
local backpack = player:FindFirstChild("Backpack")
local starterGear = player:FindFirstChild("StarterGear")
local knifeInBackpack = backpack and backpack:FindFirstChild("Knife")
local knifeInSG = starterGear and starterGear:FindFirstChild("Knife")
if isNight() then
if not knifeInBackpack and knifeInSG then
local knifeClone = knifeInSG:Clone()
knifeClone.Parent = backpack
end
else
if knifeInBackpack then
knifeInBackpack:Destroy()
end
end
end
end
end
while true do
for i = 6 * 60, 18 * 60 do
Lighting:SetMinutesAfterMidnight(i)
updateKnives()
wait(dayLength / (12 * 60))
end
for i = 18 * 60, 24 * 60 do
Lighting:SetMinutesAfterMidnight(i)
updateKnives()
wait(nightLength / (12 * 60))
end
for i = 0, 6 * 60 do
Lighting:SetMinutesAfterMidnight(i)
updateKnives()
wait(nightLength / (12 * 60))
end
end
ur script checks for the knife only when its in the backpack
ignores it when its equipped or smthn
or in player's character
lol
imposter
Bruh help why is my r6 idle animation not playing when i start the game, look what i did, and tell me if i missed something,
I made the game to r6 only, i made an r6 idle animation and set the priority to idle, i published it and i copied the id
I copied the default animate script from the character then i pasted it inside starter character scripts, i changed the idle animation id from the explorer to my id, and i changed the script id too to my id, i changed the one with "weight 9"
But the problem is when i start the game, i look at the animation from the explorer and i see it reset the properties to the default anim id, but the script still has my anim id
Please help
wild
(function (twerk)
End
I am pretty new to scripting, could anyone tell me why this doesnβt work?
what are you trying to do
Function part animation using a server storage bool event
This is only the first part tho
π brawldev
read the underlined with red, text
That means itβs working, thatβs what a function doesβ¦
first of all why is part.part = ("ServerStorage")
and pretty sure when you're doing a local function ur supposed to name the function
i forogt a comma
are you trying to get serverstorage service without using
Putting the animation of the part into server storage? Canβt you read
those doβs and thems have no place to be there
:GetService
Itβs apart of the function and the part
Bro
is the name of ur function do?
u gotta fix that br
isnt then only for if statements
No itβs part
wheres the animation lmao
Do there because Iβm telling the function to do the animation
have you watched a scripting tutorial
In the part which is in server storage
thats not how u play a animation
while waiting after a few second
A couple of tutorials, I consider myself advanced
I just have no idea why this script wonβt work
debatable
lmao
Itβs true ask @wary star
well (βserverstorageβ) shouldnt be anywhere in any script
lmao
to get server storage do
?
It depends, you can use an animation for the script if you have a part
local ServerStorage = game:Getservice("ServerStorage )
i think
But the problem is Iβm using bool event from the Server storage part animation
i mean i dont even think we need serverstorage for this
I mean look at games like grow a garden
They did that probably
youre becoming a undertale goner
you dont even know that
You need the animation for that but Iβm using server storage and I canβt find the part with the animation
wheredd you put the animationobject
My code literally hacks their game I would know
can i see
Not hack, but like looks into the script
PPLEASE
this uh hacks grow a garden?
It depends if the animation reaches the part for it to process the bypass to grow a garden
Bro if u donβt get it donβt help me
what. is this script even supposed to do
Bruh
Iβll just get a real scripter to help to help me
llmao
ive coded for 4+ years
@lilac barn Yo
do you know what a fontface is
Why wonβt this work
drka rewatch the tutorials lil bro 
Obviously? The font of a text
okay
whats a richtext
then
and what does it mean when its true
When I enable that it sometimes makes my text smaller or removes the stroke idk
Iβm a scripter/animator not a vfx artist..
do you have the animation object in the explorer tab
thank you
But it needs to be at the part of the server storage
why is it in serverstorage
chatgpt
chat gpt 9.0
lmao
im gonna lose it i stopped coding in ages and this is the first thing i see after coming back
im dying
weβre gonna lose it
@real current if ur trying to play an animation
theres this website where
it will literally
have you animated
solve all ur coding problems
its called youtube
and you find a person called the devking
he'll show you a video and REWATCH IT FOR THE LOVE OF GOSD
hey hes advanced
oh sh mb gng 
i have made some more performance improvements and i want people to test how well it performs on their device https://www.roblox.com/games/126329526307042/IsometricSystemV4
are you remaking pokemon brick bronze
that looks so good
thanks, but not really its just a project i am working on its not really based on anything just the isometric Minecraft on the ti84
coding experience
?
pretty much
like in years if it isnt personal
local attackerAnim = ReplicatedStorage.Animations[attackerStats.AnimationPreset or "Template"][playerAttack["Intent List"][intentData.IntentCount]["Intent Damage"] or "Slash"][(playerAttack["Intent List"][intentData.IntentCount]["Intent Damage"] or "Slash") .. math.random(1, #ReplicatedStorage.Animations[attackerStats.AnimationPreset or "Template"][playerAttack["Intent List"][intentData.IntentCount]["Intent Damage"] or "Slash"]:GetChildren())];```
GOD i am so good at coding
this is REAL code written by a REAL human
and yes... it works exactly as intended...
Guys I want to make game on unity but also on Roblox. Should I pick only one or is it good if I will do both?
i linger 60-70 fps when moving
He aint
i play on a shit box and got around 12 fps when moving but 80-90 when static
The guy who wrote that has a battery capacity of a brain
also is it procedurally generate?
also can anyone tell me how i can make this so i could apply to be a builder https://www.roblox.com/games/131200410211454/Archway-Showcase
real ones learned lua from peas factory
his tutorials still hold up to today βοΈ
i dont even know how i learnt lua
Does this organization and set up for the folders look correct if I'm trying to overwrite food values on Minecraft? This is a Datapack.
i think i just followed tutorials and learnt smh
im sorry but this aint a minecraft-related server
i started learning lua when i was 11 how d'you know??? π
@slate lotus I mean it's also not a Linux related one or HTML related one but everybody talks about those things so.

fairrrr
i dont know anything abt minecraft mods
might wanna go to a different server
Plus, I've been exhausting myself on Google looking for answers for the last 4 hours.
chatgpt
I'll try.
or like i said, search up minecraft modding discord servers
what's the problem?
why is it 4:05 am for you
timezone
yes if she clearly likes him, then nothing will be ruined

are you guys running any community made framework such as Knit or Nevermore, or did you make your own?
I made my own framework which is similar to knit
Knit is bloatware imo
yeah, i stepped away from Knit myself too
cool whats your setup?
ok whats your setup
I use promise for some multi threading
uhh like 10 year old cpu and my gpu is gt 710
like 15 years old
imma try it out
I don't think ChatGPT knows what it's doing sadly.
I need both to set up the correct folder structure and need someone with some experience to help me figure out if this code looks right. In any case, it doesn't work. So I'm doing something wrong.
find a discord server specialised in minecraft modding
80 when moving, 200 when still
sup guys
who can help me
i want to make games on unity and on roblox. Is it good if i will do both or better to stay on roblox
fukahh question 
what
gayahh question
I made a game and on mobile the camera stuck under the map pls help
thanks, what is your setup
i personally used noise for the terrain with a chunk loading system to make it infinite but i wont work for general terrain in the image you have shown https://www.redblobgames.com/maps/terrain-from-noise/
modulescriptsipts
thoughts on using blockcast + target assist or locktarget for this?
its running raycast right now
rpg
Doin professional scripting for 400rbx
do you have a portfolio?
Nah i have previous works
ok, such as?
that's a good start, although if you want to find work in the future i would recommend making a portfolio with your past works, experiences and past clients (if you have any). also i would recommend saying "doing luau programming for 200rbx" because professional is a bit much for what was shown.
Oh ok
ryzen 7 7800x + rtx 4070
thanks 
oh sorry i just didn't see any message, must of been deleted
I need concept team members, anyone?
Does anyone actually use os.clock
i do, for testing if something is running for too long
It seems kinda pointless
@karmic wadi dm
Very useful
For anything time related
For example, tick systems use os.clock()
how do i do this?
Thats os.time() no?
clock is for cpu usage
Can someone help me with my games bug? I can pay robux
(time)
os.clock is for timing run time and os.time is for real world timings
Which is not stored with as much precision
Yeah, which is why os.clock is used it's used for tick systems
It's best to use os.clock when comparing two times without switching runcontext
Os.time is not that useful since i believe :GetServerTime() is better
erm actually GetServerTime doesnt exist
Name could be slightly different
But it does exist
:GetServerTimeNOWWWWW
dialog's need to be interacted first
ill look that up
Im losing it how can i fix the fling due to body velocity if i collide on something?
what?
What is this?
A gif?...
How do I know how much a system is worth ? If I wanna comm someone for a whole game scripted
Can someone help me with my games bug? I can pay robux
Hitbox cancollide is on
tf did you expect me to reply with @zenith sphinx ?
the problem is when hitting the wall the hitbox can't collide
Why should it
I think the fix is not wearing hello kitty pants
Hitboxes are not meant to collide
time()
anybody know why if I don't add task.wait() in here, the script waits for the coroutine to execute and then goes over to the main body loop instead of executing both simultaneously?
Spawned threads are excuted immediately
Executed
because it's doing almost instantly
Not almost
not the case in the second output no?
You are yielding it to the next cycle
Spawning a thread does not delay the code
It will execute the same as if it wasn't a different thread
What it does is
Make it so that yielding it doesn't yield the main thread
If you want a thread to run after the main thread
You should defer it
Deferred threads are executed at the end of each cycle
(not on the next cycle)
Also use task library instead of coroutine library
It's an updated version of the coroutine library
i don't think you understand me, both scripts are the exact same save for 2 task.wait(1) lines that i added. Functionally, the output of the scripts shouldnt be affected by the added task.waits, but it for some reason they are.
also this is just example code, i'm not acutllay using it
Exactly
The task.wait should affect it
Because it yields the spawned threads
It is thread specific
The coroutine you spawned is one thread and the main thread is another one
with help?
Why would I take you seriously when you're probably paying <100 rbx and are channel misusing
how long would it take to learn c#
nah we can negosiate the price..
im not miss using im asking for help
yeah i understand that part. What i don't understand is if we remove all the task.wait() statements why is the coroutine loop being executed before the main body loop and not at the same time.
Because it's called before it
but it's a co-routine, if i wanted something to execute before something else i wouldnt even bother with multi-threading
What is wrong with it executing first?
the fact that it's supposed to execute at the same time because it's a coroutine
No it's not
They are executed on the same cycle
The computer treats a cycle as one instant in time
If you want them PHYSICALLY running at the same time
You have to use multiple cores
And desynchronize the execution
how long is this cycle
if i make the loops long enough then they should overlap
The time from 1 frame to the next is 1 cycle
On 60 fps its average 0.016 ms
No
It seems you are not understanding how the task scheduler works
alright, so if i make it so that the loops execute for 0.032ms in total then the latter cycle should have both the coroutine loop and the normal loop yeah?
No
Yielding it at all will move it to the next cycle
(Minimum)
You can only yield for 1 cycle 2 cycle etc.
You can never wait for 0.5 cycle or 1.5 cycle or similar
@chilly rock if this doesn't make sense to you
Then you probably don't know how task.wait works
It doesn't wait the exact duration of time
yeah it doesnt make sense to me
It checks if the elapsed time since it was called is greater than or equal to the wait duration every frame
but even if we throw away task.wait from the equation it still doesnt make sense to me
Which part
so what you're saying is that if the coroutine has coroutine.yield, then it doesn't really execute at the same time as the rest of the script?
so it's like pseudo-multithreading
No
It never runs at the same time
It just runs on the same cycle
okay i think i understand that
so takeaway is that if i want really precise and time-sensitive operations with coroutines then i have to be careful
If you mean order of execution then
yeah
You need to understand how the game handles running code
And how it decides which order to execute in
these "cycles" are the things called heartbeat right?
If you understand it, you can manipulate it
Yes, heartbeat is fired once every cycle
is that basically the same as minecraft's "ticks"?
Sorta
Ticks are not dependant on frame rate
That's the only difference between ticks and cycles
For example if you have lower fps you will get lower cycles per second
But if you are using a tick system, you can run multiple ticks in one cycle
Meaning that the number of ticks per second is constant
why would roblox do it fps-based though, that complicates stuff so much
because different clients have different fps and the server has different fps
so all cycles arent synced
Everything is fps based
That's just how it has to be
They don't have a choice
That's why games use tick systems
To account for fps
Even other games
Minecraft is also fps based, but the tick system counters that
guys maybe im lacking some logic knowledge, do would you determine whats a NPC that can receive damage from you and a NPC that doesnt take damage
like whats common between a training scarecrow and a npc?
guys to move a model do i have to create a primary part and weld every part of the model to the primary part or can i use the pivotto function?
You do not need to set a PrimaryPart or weld every part anymore you can and should use Model:PivotTo() in most cases.
local TeleportService = game:GetService("TeleportService")
local Players = game:GetService("Players")
local teleportData = {
migrated = true,
timestamp = os.time()
}
local function migratePlayers()
local allPlayers = Players:GetPlayers()
if #allPlayers == 0 then
warn("Nenhum jogador para migrar.")
return
end
local success, err = pcall(function()
TeleportService:TeleportAsync(game.PlaceId, allPlayers, teleportData)
end)
if success then
print("Teleport iniciado com sucesso!")
else
warn("Erro ao teleportar jogadores:", err)
end
end
task.delay(10, migratePlayers)
like this?
yes, can make clearer and better later but yes!
Make sure this is the PlaceId of the live experience. This script won't work properly in Studio, so test it only in the published game.
Clearer data: Add a reason to the teleportData so you can detect it later (if needed).
alternative to using collisiongroups
how do i disable footstep sounds?
what?
Using tags probably
If you are working on a larger scale
Using components
Is ideal
holy what are the odds (i was literally scripting this aswell)
oh wow lol. π
Use Tags or Attributes
You tag each NPC or dummy using CollectionService
Did you set the camera type to scriptable
Are you asking how to replicate MUGEN style targeting or camera lock-on behavior in Roblox?
no
im just asking how they did it
ah okay
for mine i just used hookes law and damping to calculate the force at which it should spring back
not only does it make it super jittery it also feels a lot less smooth (like mugen)
Switch to Interpolation, Not Forces
Ok then
mind explaining this a little more
ive only been scripting 2 days π
i know what interpolation is but
what would it change
way to smoothly βblendβ or βmixβ between two values over time, rather than jumping straight from one to the other.
local uis = game:GetService("UserInputService")
local rep = game:GetService("ReplicatedStorage").LockOn
local Magnitude = require(rep:WaitForChild("MagnitudeScript"))
local Spring = require(rep:WaitForChild("SpringDamping"))
local plr = game:GetService("Players").LocalPlayer
local character = plr.Character or plr.CharacterAdded:Wait()
local cam = workspace.CurrentCamera
local mouse = plr:GetMouse()
local RunService = game:GetService("RunService")
local MaxDistance = 100
local velocity = Vector3.zero
local lockon = false
local lockedTarget = nil
local lockonConnection = nil
local function FindClosestPlayer(cursorPos)
local closestPlayer = nil
local shortestDistance = math.huge
for _, obj in ipairs(workspace:GetChildren()) do
if obj.Name == "Rig" and obj:IsA("Model") then
local char2 = obj
local distance = Magnitude:GetDistance(cursorPos, char2)
if distance and distance < MaxDistance and distance < shortestDistance then
shortestDistance = distance
closestPlayer = char2
end
end
end
return closestPlayer
end
uis.InputBegan:Connect(function(key, gpe)
if gpe or lockonConnection then return end
if key.KeyCode == Enum.KeyCode.E then
print("Lock-on detected")
lockon = true
lockedTarget = FindClosestPlayer(mouse.Hit.Position)
if not lockedTarget then
print("No valid target found.")
return
end
lockonConnection = RunService.RenderStepped:Connect(function(delta)
local cursorPos = mouse.Hit.Position
if lockon and lockedTarget and lockedTarget:FindFirstChild("HumanoidRootPart") then
local rootAttachment = lockedTarget.HumanoidRootPart:FindFirstChild("RootAttachment")
local heightOffset = Vector3.new(0, 0, 0) -- adjust this value to taste
local targetPos = rootAttachment and (rootAttachment.WorldPosition + heightOffset) or (lockedTarget.HumanoidRootPart.Position + heightOffset)
local displacement = cam.CFrame.Position - targetPos
local force = Spring.RestoringForce(displacement, velocity, 1, 5)
velocity = velocity:Lerp(Vector3.zero, delta * 5)
local cameraLift = Vector3.new(0, 1, 0)
cam.CFrame = CFrame.new((cam.CFrame.Position + cameraLift + velocity), targetPos)
if Spring.SwitchCondition(displacement, 40) then
local newTarget = FindClosestPlayer(cursorPos)
if newTarget and newTarget:FindFirstChild("HumanoidRootPart") then
lockedTarget = newTarget
end
end
end
end)
end
end)
uis.InputBegan:Connect(function(key, gpe)
if gpe then return end
if key.KeyCode == Enum.KeyCode.R and lockonConnection then
lockon = false
lockedTarget = nil
velocity = Vector3.zero
lockonConnection:Disconnect()
lockonConnection = nil
print("Lock-on released")
end
end)
local
local Spring = {}
function Spring.RestoringForce(displacement, velocity, springConstant, damping)
return (-springConstant * displacement) - (damping * velocity)
end
function Spring.SwitchCondition (displacement, threshold)
return displacement.Magnitude > threshold
end
return Spring
module
aha
Replace your RenderStepped handler with a Lerp based one
You no longer need Spring.RestoringForce or velocity Lerp handles the smoothing for you
wouldnt that remove the springyness?
oh
pure Lerp gives you exponential smoothing (a nice easeβout) but no oscillation. If you want that classic βspringyβ snap back with a little bounce, youβll need to reintroduce a spring but in a numerically stable, frame rate independent way, rather than naively applying forces every tick.
Components in an Entity component system structure
Your Hookeβ―+β―Damping Jittered
force = -k * displacement - c * velocity
applyForce(force)
you rely on Robloxβs physics solver (or your own integration) each frame. If your dt fluctuates, or your spring/damper constants arenβt tuned to critical damping, youβll see overshoot, jitter, or energy gain/loss.
if i wanted to make a code system do i really need a lot of boolvalues to see what was redeemed or nto
yeah
i was probably going about this the wrong way
Instead of using physics forces, manually integrate a damped spring
i dont see a lot of oscilation in mugens version either
-- Spring parameters
local k = 50 -- spring constant
local c = 10 -- damping coefficient
-- State
local camPos = cam.CFrame.Position
local camVel = Vector3.new(0,0,0)
RunService.RenderStepped:Connect(function(dt)
if not (lockon and lockedTarget) then return end
local targetPos = lockedTarget.HumanoidRootPart.Position + cameraOffset
local displacement = camPos - targetPos
-- 1) Compute acceleration (F = m*a, assume m=1)
local accel = (-k * displacement) - (c * camVel)
-- 2) Integrate velocity (semiβimplicit Euler)
camVel = camVel + accel * dt
-- 3) Integrate position
camPos = camPos + camVel * dt
-- 4) Apply camera
cam.CFrame = CFrame.new(camPos, targetPos)
-- (optional targetβswitch logic here)
end)
this should work saved from notes and kept updating
how would i do that
Pick k (stiffness) around, say, 50.
Set c slightly below 2*sqrt(50) β 14.14 β e.g. c = 12.
if you want some bounce
OH
starter player
alr thanks ill try these out
okay π
If you don't wnat oscillation you can just lerp
By a fixed amount each frame
here is a blend of em for like the βsnappy typa effectβ
(multiply with deltatime if you don't want frame dependancy)
-- after computing newCamPos via Lerpβ¦
camPos = camPos:Lerp(desiredPos, lerpAlpha)
-- then run a lightweight spring correction toward camPos
local springAccel = -k*(cam.CFrame.Position - camPos) - ccamVel
camVel = camVel + springAcceldt
local finalPos = cam.CFrame.Position + camVel*dt
cam.CFrame = CFrame.new(finalPos, targetPos)
Use \ before *
* allows you to do this *
fr!??
this might be simpler ngl
It's simpler yes
/hi/
It would look something like
\hi\
ohhhh
*hi*
/\
/*beans*
/sd
aw cool, thanks!
!!
/****
local newCframe = currCFrame:Lerp(targetCframe,0.1*dt)
Something like this
Would work
would lerp make it snap back though
we can forget the
Unless i got some syntax wrong
oscilation but
Yes
If you want it to be stronger just increase the number
1 will make it snap back instantly (you couldn't even move it away)
0 will never snap back
(basically no lock)
i do want the cursor to have a bit of freedom though but obviosuly not have it like completely away from the target
would i just set a range and lerp the camera position back to enemys hrp
Nah it's lerping angle here
The target cframe is the cframe pointing exactly towards the target
And the current cframe is well
The current cframe
im so confused
so its basically like
taking the shortest path when you rotate?
alright thanks ill try it out
so i made it work
BUT
theres this uncontrollable shaking
that sucks man π¦
ya i gotta fixi t
@rich gust do you think its because im using world position
local uis = game:GetService("UserInputService")
local rep = game:GetService("ReplicatedStorage").LockOn
local Magnitude = require(rep:WaitForChild("MagnitudeScript"))
local plr = game:GetService("Players").LocalPlayer
local character = plr.Character or plr.CharacterAdded:Wait()
local cam = workspace.CurrentCamera
local mouse = plr:GetMouse()
local RunService = game:GetService("RunService")
local MaxDistance = 100
local speed = 5
local targetPos = nil
local lockon = false
local lockedTarget = nil
local lockonConnection = nil
local function FindClosestPlayer(cursorPos)
local closestPlayer = nil
local shortestDistance = math.huge
for _, obj in ipairs(workspace:GetChildren()) do
if obj.Name == "Rig" and obj:IsA("Model") then
local char2 = obj
local distance = Magnitude:GetDistance(cursorPos, char2)
if distance and distance < MaxDistance and distance < shortestDistance then
shortestDistance = distance
closestPlayer = char2
end
end
end
return closestPlayer
end
uis.InputBegan:Connect(function(key, gpe)
if gpe or lockonConnection then return end
if key.KeyCode == Enum.KeyCode.E then
print("Lock-on detected")
lockon = true
lockedTarget = FindClosestPlayer(mouse.Hit.Position)
if not lockedTarget then
print("No valid target found.")
return
end
lockonConnection = RunService.RenderStepped:Connect(function(delta)
local cursorPos = mouse.Hit.Position
if lockon and lockedTarget and lockedTarget:FindFirstChild("HumanoidRootPart") then
local rootAttachment = lockedTarget.HumanoidRootPart:FindFirstChild("RootAttachment")
local rawTargetPos = rootAttachment and rootAttachment.WorldPosition or lockedTarget.HumanoidRootPart.Position
local heightOffset = Vector3.new(0, 0, 0)
targetPos = targetPos and targetPos:Lerp(rawTargetPos + heightOffset, delta * 10)
or (rawTargetPos + heightOffset)
local cameraLift = Vector3.new(0, 1, 0)
local currentPos = cam.CFrame.Position + cameraLift
local newCamPos = currentPos:Lerp(targetPos, speed * delta)
local lookAt = targetPos + Vector3.new(0, 1.5, 0)
cam.CFrame = CFrame.new(newCamPos, lookAt)
local displacement = cam.CFrame.Position - targetPos
if displacement.Magnitude > 40 then
local newTarget = FindClosestPlayer(cursorPos)
if newTarget and newTarget:FindFirstChild("HumanoidRootPart") then
lockedTarget = newTarget
end
end
end
end)
end
end)
uis.InputBegan:Connect(function(key, gpe)
if gpe then return end
if key.KeyCode == Enum.KeyCode.R and lockonConnection then
lockon = false
lockedTarget = nil
targetPos = nil
lockonConnection:Disconnect()
lockonConnection = nil
print("Lock-on released")
end
end)
possibly, Use WorldCFrame.Position instead if the target is rotated and you want to preserve facing
Add camera lag delay for more cinematic feel
You're not lerping the camera cframe
Yes, switching from RootAttachment.WorldPosition to HumanoidRootPart.Position will:
Reduce weird offsetting
Improve stability
Eliminate that "camera shoves character around" feel
Be more consistent across devices (mobile, PC)
but also
Smooth Lerp Camera with Damping
targetPos = targetPos:Lerp(rawTargetPos, math.clamp(delta * 10, 0, 1))
I EAT BACON HEHEHE
oh yeah its working now
what happens when you make a dash ability thats handled client side
im in over my head though ill probably re do it later on when i have a better understanding
after a point i had to resort to using AI because im too slow 
wdym by handled
Hi guys
I wanna know something
If we use deprecated things in code they still work if im correct?
anyone know?
yes yes
correct
AI bad
π
Yup
π
Hi I got a problem with a script for example I got 80 Coins I purchase the Bloxycola for 50 so now I got 30 Coins but here come the +2 of coins now Im at 82 coins (like it ignore the purchase idk why can someone help me?
ππΌ
show the main script where the purchase happens
You are adding coins from DataManager every 60 seconds, but your BuyToolHandler script is not using DataManager to subtract coins it's modifying leaderstats.Coins.Value
fix / solution
Update your BuyToolHandler to use DataManager:BuyTool() instead of handling coin logic itself
this is optional but ( You can still insert the StringValue manually, but BuyTool() already does it (line 50 in DataManager). So if you want a cleaner setup, remove the insert code and trust BuyTool(). )
Yo man i need help with one thing
ok so you know in some games
Like in bladeball or smth you can see your own character with the new weapon but other players see their own character
how would you do that
1 or 2 (1 i Guess)
can anyone help me with code, im working on a game where u search for stones but i need help how do i script stone spawning every 30 secs and picking up when found system. i have 1 dev working with me and we would be happy to share funds and work with us if anyone wants
or i can try to put he 1 inside of datamanager?
Guys I don't fcking understand why people want scripter with 2+ more years of experience to code their obby game :/
Move Tools to ReplicatedStorage or ServerStorage
Keep all tools inside ReplicatedStorage.Tools or ServerStorage.Tools.
2. Equip Tool Locally in a LocalScript
Inside your "Equip" button logic (in ButtonHandler), replace the equip logic
Don't parent tools to the character from the server.
Donβt use Humanoid:EquipTool() on the server.
Never parent the tool to the player's character from the server.
Do not parent the tool to Backpack on the server.
because experience/past work/ well done, plus they dont use AI and use thier brain⦠portfolio is good.
you should let DataManager:BuyTool() insert the StringValue, It's already doing everything correctly and safely. Just call BuyTool() and trust it.
Yeah but if you are "new" and none want to hire you for past works you will never have past works
And I dont think you need big experience for an obby :/
then start doing stuff and helping people for free to build a portfolio
u do not, or simulators/tycoons.
jus some knowledge
Hm idk
help for free, get well respected, do your own thing and build up and go from there
just keep doin you and be yourself, just keep pushing/grinding
you can do it, just takes time/effort
I thought I should create stuff and sell it, it would work as a portfolio and a way to earn robux
Ye man im working on a game similar to Hide or die and then cash of from that and then build a bigger game
The thing is that people who want help for free want always to create game π
I can't put myself in a full game rn
fr
I mean working for someone for free is kinda risky
thats a good plan, stick to that and you got it! follow dev forums, get help from people here ( feel free to msg me for simple hep, if its harder it is paid ) , youtube tutorials, just doing small stuff and learning and not overstimulate your brain
cuz like either you get big and cash of or it doesn't
Yeah at least you get extra experience
very true, hit or miss, if its not unique or original dont do it.
Yeah man thanks
if you like the idea and think it will do good+ they have sponsers/ads/devs, it will be good/possibly
ofc anytime
π€©
you still get a good portfolio for helping people for free and making them happy.
its just a lot of time/work
Hm ok
Who needs help for free?
from me, but i got devs
I can also accept robux if you want ππ
who doesn't
Some people who only wants real money
Ig they are adults or smth
What is block casting?
yeh
true
never heard
