#code-discussion
1 messages · Page 293 of 1
render stepped runs every frame
RunService.RenderStepped:Connect(function()
print("tuna") -- will print every frame
end
ah so if i change cframe every frame its like flawless
do u have like any code to show?
yes but it should mainly be used for visual stuff
not physics
question, if i wanna for example make a part follow a player i also do this right?
what do you mean by a part follow a player
yes
just slap a lerp on it to make it animated
Why who are u
making a anime styled roblox college wrestling game lmk ur thoughts
i have a vehicle chassis whose camera rotates randomly sometimes, could anyone help me understand why its doing this rather than acting like every other vehicle seat camera?
is a scripting event a competition?
whats the best way to get player in local script?
Players.LocalPlayer
Yes
How do you join?
im struggling at learning scripting, where do you guys continue learn scripting after learning the basics?
What do you consider the basics
like variabels, function, tables, statement
No loops?
loops too
i watched thedevking
for basic
do i have to continue watching the advanced one?
Are you just watching them or are you creating as well
well each video i watch, i test how it works too, like function i try making something with it
how to make datastore
Do the advanced tutorials ig but the only way to learn complex stuff is js making games or systems and reading up on docs and even getting some assistance from ai don’t be brainwashed by ai though like asking for whole scripts if you don’t know how to do something you can ask it for small info
docs? whats that
Like if you wanna learn how to make combat games look at how other people make combat systems
Roblox documentation
where you find that
i asked ai for small help and it broke my entire game
is it createrobloxcom/docs
Js type Roblox docs on the Internet you’ll find it
It has all the documentation for every method use ai to figure out small details and use the community forums and have a look at how good systems are written
Use data store service??
ohhh
i see
thank you very much for the information
It’s gonna take you a while just enjoy the journey
Find things that motivate you to make things and you can make things you love
okay im going to continue learning
Cause making games can be really demotivating so preserving is the most important skill
can you tutor me
I can’t atm I’m really busy with studies and stuff
this is a developer channel
for roblox developers to talk about developing
pls fruit? as i could make a variable called fruit and ask what the contents of it are maybe thats what he is asking uk
they very explicitly asked for people to gift them fruits in blox fruits
anyone know any decent free ai website builders
i am trying to compare for a video 😭
dont
Hi guys
is it good if i update all of my managers into just one runservice connection or make them have their own runservice connections?
well let me ask u this, would u rather have all ur packages in one bus or one package in one bus x50
which is more efficent
what do u think bro, having individual runservice events will cook the scheduler
ofcourse all package in one bus, but that makes the bus heavier and slower no?
💀
that's why i'm asking
a bus is made to move alot of packages at once, it dosent get slower.
obviously if u put 10ton metal plate it would
but thats obvious
but what if one package is REALLY heavy. Should i put it in a separate bus?
we alrdy gave u the answer but ur still yapping abt some stupid shit like "bus gets heavier and slower" 😭
lmao nah they just overthinking it
stupid shit yeah no
so its wrong to be curious?
damn that's cool
aight
fuck off
well if thats the case you obviously need two buses but the thing is if its really that heavy you should just break it up and send it 1 by 1. but regradless of the fact its better to do most as you can in one loop then having mulitple, thats very bad for performance
aight makes sense
yeah no fuck off
you do not understand my question
i do
that sucks but thats not my problem
ur just slow lmao
he had to dumb it down for u and make a bus analogy and u still didnt understand
cope 🤡
uh huh
You can't be serious..
Guys I think 8536 lines might be too much.
canon ai nerf by roblox
How can I write my complicatedly long code that have no reason for it to be like that then?!
No if all you do is connect presimulation in all your scripts then its always more efficient to do a simple table lookup, call functions in order, nothing else matters
The overhead of an event connection is necessarily always more than a stored callback in your own module
perhaps try breaking them down in separate modules
They do not run in parallel whatsoever, the order is well defined, there is no "synchronization overhead," it just needs to create a new call stack which is more expensive than storing and calling a function
The performance gains are not dramatic either, its around 50% time saved per task, which only matters if you have a growing/variable number of tasks, such as "update entity health via a loop." The difference between 1 and 10 runservice connections is next to zero
Yeh now tell ur ai to divide the scripts into parts
It's too funny to stop I'm going to find a way.
I agreee
I don't know what's up with all these blox fruit things
😭
i dont think its a scam theyre just genuinely asking for free stuff
I think they are just trolling.
its obvious
thats crazy

holy consumer
stuck in the matrix
Do we really need this reminder all the time?
yes
you'd be surprised how many people ignore it
so for instance, a player clicks a button, and it goes from claim to "Claimed", how do i make data store save that information, so that when he logs on again its saved
Is Roblox Studio still a good text editor or should i use tools like Rojo to link it up with VS Code? (I don't know why I need VS code)
better intellisense
optional
thank you
can exploiters spoof touchinterest?
people will pay more for good animations but you could probably still sell it with subpar ones
O
I’m not an animator tho is it easy?
no, but if they could then they could also just skip the touchinterest part and give themself the tool
if you know your way around the animation editor youll probably do fine
I don’t but there’s tutorials 💔
altho the most decent gun systems have CFrame animations hardcoded in
you dont necessarily need to be an animator to make a good gun system
if thats what ur asking
true
.
so you wanna script a gun system
a really good one
I thought there’s a other way since someone said so
Ye
FPS or third person?
There are two ways you can go about that
You can use a FPS viewmodel rig
and animate that
OR you can use normal roblox animation rig and animate on that while scripting it to show the arms etc using a Fake Torso
both methods have its advantages and disadvantages
With this method, its really easy to repliacte the animations
Just playing the animation automatically replicates to other clients and they can see you
with the above method you will need additional code to handle the replication , and in some cases you might need separate animations just for the third person view
But what if first person then this ye?
this shoots two birds with one stone
This works for first person as well ^
O
Its easier to replicate to other clients
But id say you should start with this first
Is it your first time making a gun system?
Yes tbh
Making animations for cheap 😉 js doing it for hobby
Mhm
also whats your scripting experience
DMs
Me when a function expects an unknown as its 2nd argument, but it's being given a a:
cute mouth
hello im new in coding how do i learn it
learn some basics like what a variable is, what types are (int, boolean, string)
and then jump into it
i already know them
i can script basic things like doors
then next I think the meta is to just ask AI like "here's what my end goal is, what's the first step to achieving it"
and then if you get stuck you can ask it for some pointers
it can also explain different things and you can ask it what the best practice is
it's information will be slightly outdated but I don't think that'll cause any big issues
claude is the best coding AI as far as I know so I would ask claude specifically
i ask gemini most of the time,idk why but it gives good enough results to me
it has very low message limits tho
gemini is pretty good for explaining stuff tbh
Tryna get hired as a scripter
you wanna get hired?
Yes
are you good at data store and profile store?
Yes am good with data stores but still learning.about profile.data stores
Dms
guys please
https://www.roblox.com/games/90642632414698/Roll-for-a-Brainrot
check my gameo out
and tell me if u have any feedback
The ultimate RNG challenge is here. Claim your base, spin the machine, and collect the most cursed BRAINROT in the universe.
🛠️ HOW TO PLAY:
CLAIM: Grab a base and start your journey!
SPIN: Hit the machine to roll for random Brainrot items. 🎲
COLLECT: Build a massive collection of rarities to flex on the server.
UPGRADE: Spend your ...
it says experience is unavailable
reload it please
okay wait a min
yea i make it as a teacher to tell me why i should do the script in a certain way
can someone really help me in data store?
i really really need help, i got a deadline to meet, and like, i cant understand how i can make it work with yk buttons, how to save a clicked button in data store
can someone please help me?
should have learned to script before taking a commission bozo
not a comission
like im making a game
and i need to finish the deadline before yk my team crashes out
should have learned to script before making a game bozo
hm...
go watch brawldev's tutorial on datastores and read the documentation for pcalls and :GetAsync and :SetAsync functions
hmm alr alr
I'd just use profilestore as normal datastores are a pain to implement properly
what is profilestore?
Its a datastore wrapper
Godot or roblox studio?
huh?
Which better
Which one better
for a beginner? roblox studio
Ok
depends, what's your goal?
lowkey unreal engine
roblox studio is unmatched for easy multiplayer implementation and is easier to use as a beginner, however it has a lot of limitations and restrictions due to roblox's guidelines
godot does not have these restrictions, nor does it have any licensing fees (so you dont give money to the engine creator for making a game with the engine), however it's more manual as they don't automatically give you every system outright (e.g. multiplayer, player movement, etc), you have to make them yourself
unreal engine is not good for low end pcs lol
blueprint brings its ease of use up but you gotta have a pretty decent pc to run it
unity
and its also not for everyone, its very tailored to high quality games
true but if u got a good one then utilize it to make a nice game and not some slop
good with mid-range pcs, can make 2d+3d games, big community so lots of assets, and a lot of freedom for things you want to make
there is the licensing fees but they're too bad imo
there's also the factor of it takes up a lot more space in all aspects; the engine, projects, and final builds
its build times are also a lot higher
its biggest selling point is its graphical capabilities
people burn out to quickly and if they can't finish something on roblox studio then those other platforms are not made for them
it's possible to achieve the same thing in unity and godot, though they both take varying amounts of effort
godot being the most effort as youd probably have to rewrite parts of the engine im ngl lol
i don't think that's true, you can choose any engine you'd like
just because roblox studio provides you with more to start with, that doesnt make it much less burnoutable than other engines
you're still making a whole game
it's a problem a lot of people face, but that doesn't mean that "game development isn't for you" because i don't think it's impossible to overcome
what i'm saying is that studio is easier to navigate especially for beginners
roblox studio is not really a full on game engine, just a sandbox more akin to gmod with a lil more freedom
tbf roblox did start as a physics engine so maybe the term game engine does apply some bit
ehh i'd still call it a game engine
a game engine is just a program/framework that provides the necessary tools, libraries, and systems necessary to create a game
which is what roblox does
however, in terms of how it performs as a game engine, other engines do better
how to learn scriping?
jump straight into making something, ask AI all your questions (ask it questions like you would with google search or a tutor on discord)
❓
im modeler n builder
then put it as such, don't put dev because people will assume that you can also do scripting
as for how to learn scripting, just go watch brawldev's tutorials and read the documentation
watched all videos and doesnt learn me anything just basics how to usel local and other variables
and dont know how to use them in systems frameworks n other thing
well you're supposed to learn the fundamentals before getting into complicated things
it's boring at first but it's necessary if you want to understand anything inside of a script
systems and frameworks are already on their own pretty complex for a beginner to make
so i should just watch videos about ppl that making any game or system ?
whats thing thats easy to learn?
Me and My friend is searching for job in roblox Studio.We can make to you scripts For Robux or Models.For Robux
scripting isn't easy, it takes time and attention. the easiest way to start off, imo, is to just focus on one aspect of scripting, learn about it, then move onto the next (for example, you focus on learning about variables, and once you think you're ready for something else, you'd go for if statements)
and also, take notes about what you're learning so that you won't have to go back to a certain tutorial or webpage
yeah nah fuck allat just ask AI your questions and you'll remember what you've learned through muscle memory
actively writing code is how you learn
this is true
Scripters are just a type of dev
i'll tell you this; once you've learned how one thing works, it'll be easier later on
AI is the easiest to use search engine and more. treat it just like you would treat google search, a tutor, and so on. just ask it all your questions while you write code
but do not rely on the AI for writing code for you
apart from the fact its less reliable for accuracy
so if i turn tutorial some1 that make for example framework and will copy it to the studio it will help me
if you really insist then i could be of help
yeah that's true.. that is kind of annoying.. but for most beginner/straightforward things it shouldn't be too inaccurate
depends on the learning style that benefits you most
it's worth a try as it can help you, but it won't have the same benefit for everyone
ahh
I asked chatgpt if a song had references to a certain topic and it said 100% it does not have any references (It does it multiple times)
well thank goodness I don't use chatgpt and I don't use AI for finding song references
chatgpt just says shit man 💔
Well I was just asking it that even though I knew the answer to simulate a situation where its really important that chatgpt gives an accurate answer
because it was a sensitive topic
can someone give me something to make i know the basics and some advanced stuff
robux
Just ask a professional then
portal game, the one on steam
a professional song analyser?
Yall what do i do when i pick up a tool and my name tag flys away ? 🙁
your name tag..?
Yeah!
is the tool anchored or is collision on?
context image for anyone who can help since i cant rn:
TYTY
Nope
is stuff named correctly?
Mhm!
your tool is probably not setup correctly
theres probably a part inside it thats not connected to the player's hand
like not welded or whatever
Ooh ok
For knockbacks and follow ups are apply impulse or body velocity better
returns the same vector3 but with magnitude being 1
it divides the x, y, z by the length of the vector
ye
what is the usecase of raycast ?
it normalises the vector. I think this is done by dividing the vector by its magnitude (length of the vector). you normalise vectors when you want its magnitude to be equal to exactly 1 while still preserving the direction of the vector
guys i got a question. I have a laser that, when it hits an player deals 50 damage. The problem is that i want it to go through the first player and also hit the second player. If i now use a debouce so that u dont danke 50 damage every nanosek, the second player gets left out cuz the debounce restricts it
idk what to do
Use a "denounce table"
add the player to a table
u gotta explain me im kinda new
Code got it
how do you tell if code was made by ai
Lots of AI like comments, its harder to detect nowadays tbh
Claude writes some pretty good code
cant somone jus say "no comments" and then u jus cant tell?
local hitPlayers = {}
while laser is alive do
if laser hits player do
if not hitPlayers.contains(hitPlayer) then
player.damage()
hitPlayers.add(player)
end
end
end
Yeah kind of
lol u the goat
bro my code has comments everywhere and i always get told im AI 🙏
Sometimes its pretty obvious but
Well ppl just dumb then
comments are considered AI most likely cuz people cant be organized
Ai writes comments like essays
i see
on comments
Yeah I feel that af, I comment my code a lot
if it's indistuingishable and works then it doesn't really matter now does it
Yeah
but like what about like how it sets up the games wouldnt ai do it in a specific way?

no it can vary from which AI, what prompts, and so on
Why does it matter vro
like when i used ai it jus gave me a bunch of local scripts
🙏💀
if i hire somone i wana know if they used ai or not
well then learn how to script or find someone with reputation
You can only really tell if you have actual experience
1 takes time and the other expects to be paid way more
Also asking said person programming questions is also a way of knowing if they are bs or not
Thats how life is man
okay then enjoy your maybe-AI code
you could pay $20 for a Claude Code subscription and connect the roblox MCP directly to claude
eh i dont trust ai that much yet
most i would use it for is to comment code
plus dosent ai have limits
like after a certain ammount it jus dosent talk to u
yeah but if you're working only on one project you'll rarely run into the limits and the limits only last up to a few hours at the most
you'll usually run into maybe 1 or 2 hour limits if you're abusing the AI for just 1 project
ai is telling me to take a break 🥀
Yeah idk what you talking abt claude code is peak
u made anything with it?
Helped me with a bunch of stuff
local hitPlayers = {}
laser.Touched:Connect(function(hit)
local target = hit.Parent
local TargetPlayer = target:FindFirstChild("Humanoid")
if hit.Parent:FindFirstChild("Humanoid") and target ~= character and not hitPlayers[target] then
hitPlayers[target] = true
TargetPlayer.Health = TargetPlayer.Health-80
end
end)
end
this looks good to u?
oh i messed up
It also wrote me a whole chunk generator with noise
anyways
🥀
You need touchended to remove player from table too
how much better is the paid version cz like claude's free seems to have a decent limit
no
so yes or no
yes that looks fine I think
hmm as long as this script is part of the laser itself
Im using free and i havent ran out once
or something like that... I'm really tired
basically you want to ensure that when the laser is deleted, then the players are removed from the table.. or if a new laser hits, it uses it's own table
does debris work for deleting the laser?
I dunno I'm still new to luau
Guys I’m working on a rng game in which you buy dice from shop and roll it to get a character and place in your base for money and rebirth so what should I start with coding in here I’m new like started 6 days ago
I have no idea where to start in coding
make a dice that rolls
….
Should I make a database with all the characters in it and a leaderboard and all
no
you should focus on the core gameplay, one step at a time
first make your dice roll how you want it to, then get it to give you a character
make a base that you can place characters on
make the character give you money
add rebirthing
then you can focus on adding more characters, making good UI, balancing the rebirth costs and money amounts,
and so on
yes
Yo thanks man
how much would you guys charge for a full sonic movement system
are you buying
i am
uhh I dunno
guys there is a weird block always spawning in my character but its only client sided what could it be or where can i find it
u are probably changing transparency of humanoid root part in one of the scripts
is that a thing?
like its an invisible part in every character
idk
omg i know how
i tried to hide all players and if i make them visible i also make that part visible
but how to change that?
make that part not visible
either filter it out (^), or after you make all parts visible, specifically re-hide the humanoid root part
alr
is it normal to get overwhelmed by the code you scripted for a like 5 minutes?
like you go in studio see the code you made last night and tweak out for a lil before remembering how it works?
or is that just a me problem
yeah but usually that's a sign of room for improvement
i normally understand things better the next day
or a sign that things can be changed
i often have this cuz in my game i have a lot of old scripts with 1k+ lines that im afraid to refactor
local gatesFolder = workspace:WaitForChild("Gates")
local buttonsFolder = workspace:WaitForChild("Buttons")
local players = game:GetService("Players")
local function gateOpen(gate, button)
local debounce = false
button.Touched:Connect(function(hit)
local character = hit.Parent
local player = players:GetPlayerFromCharacter(character)
if player and not debounce then
gate.Transparency = 0.5
gate.CanCollide = false
local debounce = true
for i = 5, 0, -1 do
print(i)
task.wait(1)
if i <= 0 then
gate.Transparency = 0
gate.CanCollide = true
debounce = false
end
end
end
end)
end
gateOpen(gatesFolder:GetChildren("Gate1"), buttonsFolder:GetChildren("Button1"))
```Can I have some help...
How’s this looking? Looking for testers too
if i is less than of equal to 0 bro?
what are you tryna do here exactly
When the button is pressed the gate opens for 5 seconds
use FindFirstChild instead of GetChildren
yeah that too
or just gatesFolder.Gate1
There's an error on script number 8
Would this game be something cool that people would play you guys think?
What should I add?
what do you even need testers for it's just a cup moving game 🥀
🔒.......................
Cause I don’t wanna keep joining on an alt 💔
And I also wanna see what it’s like when you’re not playing and others are

Good but exploiters will be the demise
because its 4 extra hours and black icon text instead of white
how do i hide prompts from certain players?
yo guys if i shoot with my laser (dw its alr coded) a rig i created takes damage if i hit it but another player doesnt. Anyone know why that could be?
if ever you want something to only affect certain players you probably do it in a local script
if it's a local script, you'd need to send a remote event to server that tells you hit the rig, server will validate it, then gets replicated to other clients
i alr have a remote event
well you could just make the cup moving solely for animation, never let the client know where the hell the cup is
wht about on the server?
yeah my server fires to client and then onClientEvent my local scripts fires Server
I think you got it backwards, the client should fire, while server is OnServerEvent 🤔
the server can fire and there is infact onclientevent
now im not sure xD
local gatesFolder = workspace:WaitForChild("Gates")
local buttonsFolder = workspace:WaitForChild("Buttons")
local orbsFolder = workspace:WaitForChild("Orbs")
local players = game:GetService("Players")
players.PlayerAdded:Connect(function(plr)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = plr
local orbs = Instance.new("IntValue")
orbs.Parent = leaderstats
orbs.Name = "Orbs"
end)
local function gateOpen(gate, button)
local debounce = false
button.Touched:Connect(function(hit)
local character = hit.Parent
local player = players:GetPlayerFromCharacter(character)
if player and not debounce then
gate.Transparency = 0.5
gate.CanCollide = false
debounce = true
for i = 5, 0, -1 do
print(i)
task.wait(1)
if i == 0 then
gate.Transparency = 0
gate.CanCollide = true
debounce = false
end
end
end
end)
end
for _, orb in pairs(orbsFolder:GetChildren()) do
local debounce = false
orb.Touched:Connect(function(hit)
local character = hit.Parent
local player = players:GetPlayerFromCharacter(character)
if player and not debounce then
player.leaderstats.Orbs.Value += 1
orb.Transparency = 0.9
debounce = true
end
end)
end
gateOpen(gatesFolder:FindFirstChild("Gate1"), buttonsFolder:FindFirstChild("Button1"))
gateOpen(gatesFolder:FindFirstChild("Gate2"), buttonsFolder:FindFirstChild("Button2"))
gateOpen(gatesFolder:FindFirstChild("Gate3"), buttonsFolder:FindFirstChild("Button3"))
``` Nothing is wrong with the code but are there any improvements I need to make?
#stopsendingcodeswithnocontext
the context is right there bro
yo i did that same practise a while ago
look directly above ur message
W
It's BrawlDev beginner series
yeah fr
but the code is good imo
alr thx
I messed up a bit so I used claude to help me
all of them were really tiny mistakes
nothing big
jst dont overuse it and ur fine
will developper products that dont work get me banned/striekd
if its false advertising then yes
yes
try add some ui or anything if u wanna improve that
Wdym
what to use with triginometry in roblox
movement and rotation
for example viewportframes, u can rotate the cam around an object
using sin and cos

yeah that's a lot of nesting
local gatesFolder = workspace:WaitForChild("Gates")
local buttonsFolder = workspace:WaitForChild("Buttons")
local orbsFolder = workspace:WaitForChild("Orbs")
local players = game:GetService("Players")
local function onPlayerAdded(plr)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = plr
local orbs = Instance.new("IntValue")
orbs.Name = "Orbs"
orbs.Parent = leaderstats
end
players.PlayerAdded:Connect(onPlayerAdded)
local function gateOpen(gate, button)
local debounce = false
button.Touched:Connect(function(hit)
local character = hit.Parent
local player = players:GetPlayerFromCharacter(character)
if not player then return end
if debounce then return end
debounce = true
gate.Transparency = 0.5
gate.CanCollide = false
for i = 5, 0, -1 do
print(i)
task.wait(1)
end
gate.Transparency = 0
gate.CanCollide = true
debounce = false
end)
end
for _, orb in pairs(orbsFolder:GetChildren()) do
local debounce = false
orb.Touched:Connect(function(hit)
local character = hit.Parent
local player = players:GetPlayerFromCharacter(character)
if not player then return end
if debounce then return end
debounce = true
player.leaderstats.Orbs.Value += 1
orb.Transparency = 0.9
end)
end
gateOpen(gatesFolder:FindFirstChild("Gate1"), buttonsFolder:FindFirstChild("Button1"))
gateOpen(gatesFolder:FindFirstChild("Gate2"), buttonsFolder:FindFirstChild("Button2"))
gateOpen(gatesFolder:FindFirstChild("Gate3"), buttonsFolder:FindFirstChild("Button3"))
@remote phoenix u gotta help me brov u the goat if u cant help noone can
"@code I need help" ❌ ❌
"@code here's my issue can you help me fix it: [issue here]" ✅
guys im starting to like learn scripting, are there any good tutorials
i started today but i cant find any good ones
@remote phoenix here is my issue can you help me fix it [issue here: if i shoot with my laser (dw its alr coded) a rig i created takes damage if i hit it but another player doesnt. Anyone know why that could be?]
LMAO
can u send script
OMMMGG
ITS +$999mil/sec LEGENDARY CARROT
i got 1 local 1 server and 1 module
chill its a experience only for this 1 thing
not for like a game
i want the script where the hits are being registered and processed
Yes
well it's like nothing unique bro it's just a lame carrot it seems really dead and plain and boring
Ez click bait
What abt
This rich diva
sure gemme a sec
idk bro that still looks pretty low effort
Hmm
it's like "I have money and some random... carrots and rocket ships.. on the moon for some reason.. and I don't even have an astronaut helmet"
the game seems to be about carrots so focus on carrots, but have multiple
oh fuck no fuck you and your claude ass game
@supple spindle ```lua
function eventmodule.CreateLasers(player, rotation)
local character = player.Character
local root = character and character:FindFirstChild("HumanoidRootPart")
local humanoid = character and character:FindFirstChild("Humanoid")
if root and humanoid then
root.Anchored = true
humanoid.PlatformStand = true
root.AssemblyLinearVelocity = Vector3.new(0,0,0)
task.wait(1)
local laser = game.ReplicatedStorage:WaitForChild("LaserModel"):Clone()
laser.Parent = game.Workspace:WaitForChild("activeEvent")
laser.Transparency = 0
laser.Anchored = true
laser.CanCollide = false
laser.CanTouch = true
local Position = root.Position
local middle = Position + (rotation * 50)
laser.CFrame = CFrame.lookAt(middle, middle + rotation) * CFrame.Angles(0, math.rad(90), 0)
local hitPlayers = {}
laser.Touched:Connect(function(hit)
local target = hit.Parent
if target:IsA("Accessory") then
target = target.Parent
end
local humanoidTarget = target:FindFirstChild("Humanoid")
if humanoidTarget and target ~= character and not hitPlayers[target] then
hitPlayers[target] = true
target.Health -= 80
print("[SERVER] Treffer bei: " .. target.Name)
end
end)
game:GetService("Debris"):AddItem(laser, 4)
task.delay(4, function()
if character and root and humanoid then
root.Anchored = false
humanoid.PlatformStand = false
end
end)
end
end
its the whole function but the main "Hit aspect" is from local hitPlayers = {}
Yeh
you could start by not using ai generated UI
well no the ai generated UI is fine
For 40%
why not clear the table after
Ez money farm
i thought cuz of the debris the table gets cleared anyways
but I just don't care to help someone who is using AI cuz I'm better off just making a game with my own AI and ideas
i believe it will be set to nil not too sure
The stats r pretty cool tho i like thag
u think that will fix the problem tho?
yea
cuz it doesnt event hit the player in the first place
hate us cuz you ain't us
I can smell the jealousy like a claude-generated UI
from a mile away
you need to do humanoidTarget.Health not target.Health
calling getservice every single time is bad practice, it's unnecessary overhead
so what to do insted?
pick cot
call it once globally then just do game.Debris
game:GetService("GetService"):GetService("GetService"):GetService("GetService"):GetService("GetService"):GetService("GetService"):GetService("GetService"):GetService("GetService"):GetService("GetService"):GetService("Workspace") am i doing this correctly?
alr
add 5 or 6 more and great
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Debris = game:GetService("Debris")
local laserModel = ReplicatedStorage:WaitForChild("LaserModel")
local activeEventFolder = workspace:WaitForChild("activeEvent")
local eventmodule = {}
function eventmodule.CreateLasers(player, rotation)
local character = player.Character
local root = character and character:FindFirstChild("HumanoidRootPart")
local humanoid = character and character:FindFirstChild("Humanoid")
if not root or not humanoid then return end
root.Anchored = true
humanoid.PlatformStand = true
root.AssemblyLinearVelocity = Vector3.new(0,0,0)
task.wait(1)
local laser = laserModel:Clone()
laser.Parent = activeEventFolder
laser.Transparency = 0
laser.Anchored = true
laser.CanCollide = false
laser.CanTouch = true
local Position = root.Position
local middle = Position + (rotation * 50)
laser.CFrame = CFrame.lookAt(middle, middle + rotation) * CFrame.Angles(0, math.rad(90), 0)
local hitPlayers = {}
laser.Touched:Connect(function(hit)
local target = hit.Parent
if target:IsA("Accessory") or target:IsA("Tool") then
target = target.Parent
end
local humanoidTarget = target:FindFirstChild("Humanoid")
if humanoidTarget and target ~= character and not hitPlayers[target] then
hitPlayers[target] = true
humanoidTarget.Health -= 80
print("[SERVER] Treffer bei: " .. target.Name)
end
end)
Debris:AddItem(laser, 4)
task.delay(4, function()
if character and root and humanoid then
root.Anchored = false
humanoid.PlatformStand = false
end
end)
end
return eventmodule
game:Destroy()
game = good
game.Clildren:Destroy()
so u changed the health thing and the getService every time or even more i might miss it so i ask
?
yes
and i ask what u changed so i understand my code
I moved the GetService's like Debris to the top of the script so you only use GetService one time (when the script loads)
ah alr
I changed the health thingy from target.Health to humanoidTarget.Health
i have a global look up table that calls all get service only once
shit gen
yeah i think thats a bit advanced fo rme
it switches from LuaU mode to Java mode and makes a hashmap
calling math.map again changes its flow over mode
but be careful, if you use it too many times then you're stuck in Assembly
but if you call it too many times it starts wiping random hash stacks
if you call it too many times again you reset the program counter back to 0 and instantly rewire the entire opcode decoder into random orders
bro got embrassed
high five!
call it just enough and you might escape the matrix
@remote phoenix here is my issue can you help me fix it: [it still doesnt work, could it be of smth else like test mode or smth]
still doesn't work in what way
make some debug print statements to see what is failing or not having the intended value
tysm
i forgot abt return end
did u said it works on npcs and not players?
can i just tell AI to make debug or does it change my code
yes
you can try I guess
oh yeah the function is never called
it is in my main script
I dont know if this is good or bad but i was able to create this super basic shop system without help i started 3 days ago
looks good keep it up
this is the ui 😭
dont use raw remote events but also your a beginneer i assume sooo
looks good tho
raw remote events?
use a lib like packets or wtv instead of remotes
but its prob irrelevant to you rn jst ignore it
okey ty
you should use a dictionairy (table)
"raw remote events" are just fine
local items = {
-- name = price
"Hammer" = 50,
"Screw" = 100
}```
they are but also you should get used to using a better method
Yeah i forgot that existed
its --
not //
fuck
this aint JS 😭
lmaoooo
no not lame ass JS, I'm used to Kotlin
ohhh
other methods are hardly better
I'm a real pro dev 🤑 😍
how did you bother to learn kotlin
it'd still be better practice to store the code in a modulescript and use a single event handler
i gotta learn it but its so weird
well I started with minecraft plugin called Skript, then moved on to Java, then eventually decided to give Kotlin a try
i do have a tiny library to poll the events and to give them types
but buffer serdes and allat is unnecessary most of the time
guys is there a way to prevent players from moving besides anchoring them
cuz then i can fix my problem
there are multiple ways
one is set their walkspeed to 0
second one is to decline their contextactionservice registering
third on is to teleport them to that spot
fourth one could be seating them and not allowing them to stand up
nah i wanna do that they can aim for like 6 seconds and then they cant move or rotate
if you decline their contextactionservice register then that would work exactly that way
note that this is done locally, so exploiters could potentially make themselves move
hmm
i mean its jst for practise anyways
but the thing is i did it with anchored and then my touched event didnt work on them
so idk what to do else
then AI gave me an code that works but i dont rlly wanna use it cuz i dont understand it. It uses GetPartsInPart and i rlly dont know how that works
GetPartsInParts gets all the parts basically that are touching your laser
even if it's anchored
cuz touch event might not work if it's anchored idk
yeah i also know that now xD
i guess ill just go with GetPartsInPart
at least it works now
"No, ModuleScripts in ReplicatedStorage do not share tables or their internal states between the client and the server."
This caused me burnout 🥀
I wish I knew that sooner
lol
You could try disabling the Humanoid.AutoRotate and then set the walkspeed and jumppower to 0
yeah true
ill jst keep it for now
i spend my whole day on this
on this 1 problem
I feel you XD, I hate when things like that happen
Does anyone know why r15 is so glitchty when it comes to making a ragdoll? Maybe I'm just ill informed.
I want to learn more complex code, but r15 is challenging with how many more limbs are actually present , especially when cloning
Well I was into learning ragdoll but it was just for R6
But I'm into cloning
R15 specifically this time
character:Clone() didn't work for me ✌️
how do you go about cloning the entire arm with r15? i feel like you'd have to go through a loop then likke put them into some type of table?
r15 makes it hard to clone a full body part because they're all split
You mean both arms or only one? What is your goal?
The Full Arm
Like how do you move/ clone that stuff in all
not just one of the singular parts of the arm.
but the arms and the hand
I wanted to make an arm cloning system similar to jojo games where you clone your hands to show a barrage animation, but r15 makes that a bit of a challenge. r6 has the arm as one full limb which would make it easy
r15 on the other hand is a different beast.
For what I have learned, it is not viable to clone character parts because that would pretty much not work
But you can still make it I think
What I did was: I create a R15 rig template and put it into replicated storage
Then I transfer the player's humanoid description to the rig, so it can copy the player's avatar
Then I parent the rig to the workspace. From now on I think you could maybe do a loop on the rig parts and destroy everything except for the arm
OHHHHH I SEE that's actually pretty cool
Or you could instead of destroying the other parts, making them invisible and CanCollide = false. Showing only the arm and animating the rig (which would only show the arm as it's transparency ≠ 1)
Perhaps what I said was more than necessary
as i've watched more videos i started to wander, are type checking and using visual studio code just preferences? ik type checking is useful, but wouldn't checking in the code do the same thing? aka print a error in case the type is incorrect?
If i understand what you mean, that would just be pointless and way more time consuming than using roblox's typing
also visual studio code is mostly a preference however it lets you use things like rojo
looking online other than type checking i see a hard push torwards oop, which may be good but i would hope that it isn't the only way to make good code
i can't seem to find alternatives, and that was my question, cause i wasn't sure if there were more of a preference or advice
OOP is great for the right situations but its only for solving certain problems, its not an architechture you would use in everything
type checking helps catch stuff before it runs so it’s just faster than relying on prints
using an ide is mostly just preference
and yea OOP isn’t needed, it’s just useful depending on what you’re making
how do you guys put a lot of stuff on your portfoli
i can only put 6
im tryna put like 20
i didnt say they do, i literally said they run on one thread
the performance gains are quite dramatic, u can test this urself (which i have done so) even for < 10 connections it can make a big difference if each one has a lot of logic
if u want to have like 20 connections instead of 1 and have shit performance go right ahead
I feel like visual studio is a preference but it does make things more organized
anyone has a begginner- medium challange for me i just finished mine.
Put on a blindfold and do the same challenge
wtf is that challange
"build a particle accelerator"
make a gun that shoots ice cream
i mean ive never been to blender so i cant make gun or icecream models but ill make a gun
added a sparse octree it will soon be used to make the engine much faster 😈
Nice
60 frames per 10 seconds
ILF an investor for a big game plan. If any investor would see this message text me
anti aliasing was nowhere to be found 😭
i am not using editable image so i can see why 
i swear the texture borders where always there 
anyone knows how to use cframe for animations?
this optimized enough? (for a tower defense game)
no why would u do that
That’s just laggier
Just use Roblox animations
It’s made for those kinda motions and it does it efficiently
how would you guys handle Resident Evil style of dialoguing in your game?
what it look like?
you know how when a character begins speaking or when a noise plays in a game, then subtitles would appear at the bottom of the window showing what that character said or what noise played?
my question is how would i organize character lines and noise queues in my code
i would have a frame with a uilistlayout for the dialouge
and the noise queues i would have a soundcontrolelr
or a dialougecontroller
with a table of all que'd dialouges and sounds
and play them until there's none left
i believe it shouldn't be too hard
ditch humanoids
i'm turning on the removal of physics calcs
so none of the physics are being calculated
realisticaly could work without humanoid too
but humanoid makes it easier to edit things like health and speed
without using attributes
might go for an attribute based solution later
it's really simple 😭
How long does it take for your applications to go through if any of you guys have sent them for this channel?
for luau scripter?
yep
it depends on how many applications are in the queue and how many ARs are active during and after the time you submit it
ahh ok
if your application hasnt been reviewed in 72 hours, you can submit an application ticket in #open-ticket to request it be reviewed
Is there a way I can check my queue?
there is not
np
EmmyLua annotations
it's better to just go for attributes
ig
luckily haven't made my tower classes yet
so i'll just go for the attribute solution
do towers also need to be dealt with in the same way as attackers?
where the server doesn't render them
i suppose this is better?
Custom movement and camera for horror survival game
︀︀#ROBLOX #robloxstudio #RobloxDev #robloxdevtwt #robloxdevelopers
**❤️ 1 👁️ 22 **
aaa game movement n camera in roblox
wrong channel and this isn't AAA 😭
just check it man
any experienced scripter could make this in an afternoon
it's
not to discredit you but it's mid
def not triple a
i appreciate your confidence though
yea
yeah do the same for towers, no reason to treat them differently if the server doesn't need to simulate them
server just does replication and calculations?
really wish more scripting tutorials taught about that
yeah exactly, server handles the logic and just replicates the results to the client
client just show models, vfx
everything else sever have to handle
while researching optimization
it's just directional looking, it doesn't look bad at all it's just def not AAA or even AA. it's nice but you need some real math that goes into it because it doesn't look smooth right now.
the movement?
well yeah that too, but i'm talking about the camera smoothing
i think it smooth
but i will try if can fix or not
you can just make a simple spring
wait
idk something like this:
local RS = game:GetService("RunService")
local camera = workspace.CurrentCamera
local currentPos = camera.CFrame.Position
local currentLook = camera.CFrame.LookVector
local posVel = Vector3.zero
local lookVel = Vector3.zero
local stiffness = 10
local damping = 6
RS.RenderStepped:Connect(function(dt)
local targetCFrame = -- your target camera CFrame
local targetPos = targetCFrame.Position
local targetLook = targetCFrame.LookVector
-- spring pos
local posForce = (targetPos - currentPos) * stiffness
posVel = posVel * (1 - damping * dt) + posForce * dt
currentPos = currentPos + posVel * dt
-- spring look
local lookForce = (targetLook - currentLook) * stiffness
lookVel = lookVel * (1 - damping * dt) + lookForce * dt
currentLook = currentLook + lookVel * dt
camera.CFrame = CFrame.lookAt(currentPos, currentPos + currentLook)
end)```
Spring is not simple
unless it is running at 100k Hz it will always glitch out
this is about stability, i was talking about framerate scaling
if the spring blows up, it's because of bad integration or not enough damping

Can you read?
nvm
my fault for arguing with a skid
i guess
I bought this pack and it has these things and no animations
steal my dinosaur
this shit is aura ngl
That's why I posted it

brother nope
is it possible to animate using these cframes?
https://streamable.com/45im26 is ts tuff for 2 years of luau? 
It's not bad
Was abt to say that
ty
You willing to show code or is this for a game you're working on?
i can show you the code, but not everything
Sounds good
pixel gun 3d
yeah the gun models and anims r not mine, it from the toolbox
nice
optimized?
Whats the arrows
Is the fire function called every single time you want to shoot?
Indentations
arrows?
Oh
btw how can i get those arrows it seems so nice
its a settings
A lot of things here can be called once instead of every time you want to fire
bro tysm
should i save it in a table the first time they fire and then use them from there?
Depends on how you have everything structured
Btw, should I keep only functions in module script for ui or I can control ui without them and just keep the init function?
Do you use OOP for each gun or are you using a gun controller?
it could work, imma try it and see
yeah i use oop
So each gun created has it's own data
Why are you requiring a module every time the gun fires?
that doesnt matter what matters is that he uses fastcast instead of raycast for optimization

i use ray cast rn but i am planning on using fast cast
is it bad for optimization?
Fastcast is old
In this video I talk about creating a projectile system, the basics of client sided replication, custom physics, and I go over some examples in my own work.
💬 Want to join the community, learn, ask questions, and hear about new uploads? Join the Discord!
https://discord.gg/ujsTNxTaCF
🛠️ Check out the code for yourself:
https://www.robl...
I would recommend creating your own
alr ty, imma watch this vid rn
holy crap my first time using claude and this thing is insane
Did roblox remove the feature to join groups in game?
@remote phoenix ty for putting me on
For some reason my in game join group UI isnt popping up but the script is activating
needing an ai to churn out code for you is lazywork
idk if this still works devforum.roblox.com/t/join-group-prompt/2609702/28
Do someone know how to make an ai in Roblox studio
like a neural network?
AI is cool to use, but have you ever wanted to make one yourself? Follow along as I make one from beginning to end live! All in Roblox Studio!
0:00 Intro
0:40 Creating the module script
2:35 Creating the network functions
5:25 Creating network constant variables
8:05 Defining a Neuron
9:35 Building the network
26:35 Feed function
38:40 Activati...
gl hf
also sorry to tell ya but how on earth is a neural network gonna help you make tadc
?
It’s to like make an AI that respond to you?
Cuz my idea it’s making digital circus Caine have you watch itv
it's a neural network or a machine learning alg
Ohh
you need a shit ton of training data for this
That’s peak I might watch it
the only reason why chatgpt and stuff talks the wsay it does
is cus it has a lot of data
trained on
its a machine learning alg trained on a TON of data
if you wanted to make caine you would prolly need to use httpsservice to get an external already trained ai hooked up and make its personality be caine
Ohhh
alas a true caine is never possible in roblox
cus caine is a VERY complex character
Ik
But like just him to do simple things in the game
Not like complex like actually complex things
Like talk and interact with the player or just teleport himself and ask the server or make a suggestion for a map
I might be wrong
yea its bad roblox game i get i t
whats the best way to make a hitox
Ts peak
so like suggesting maps and interacting with players
Raycast
Yes
for skinned mesh its different approach for r15 its different
depends on the character type
spacial queries
r6
for example this characters have different hitbox approach than r15 ones
it makes ur life a whole lot easier and allows for more flexibility
That will be lwk easy but I don’t want to add too many lines
i see
roblox has a built in service
Ik it’s easier is just I don’t like it cus when you’re playing you know that feeling when you talk to the npcs and you kinda get bored of what they’re saying and just skip it all?
that's what i suggested
what did you use
but tbh for someone like caine i doubt a llm can get him down
I use api and paste it into the script to make it go to storage and that the npc will respond
which api
I was trying many first I I was using anthropic I think it’s called?
And other I forgot
Qrorc
Or whatever
local generator = Instance.new("TextGenerator", workspace)
print(generator:GenerateTextAsync({
UserPrompt = "hello"
}).GeneratedText)
this is roblox's built in
you can give it a system prompt
Ohhh
Wait I alr remember
I was using Claude ai and get its api to send message to Roblox studio but it wasn’t working for some reason
Ok, so I joined to be a DEV not a LOSER like YOU i was about to send a chat about my game idea until I seen this message and I grindet my teeth
i have no iamge perms
lets talk about life until i get my image perms and than we can continue this conversation
you need bronze 2 trillion which takes infinite messages
im like the time lord or something bro
so life
it hasnt been great
I think i should stop the ad
ok so I joined to be a DEV not a DEV like DEV
ik nothing about scripting btw and im in code discussion
I was about to send a DEV about my DEV until I seen this message and I DEV
bro
js shut up
u might have ADHD
I was about to send a chat message when I seen this and I grindedt my teeth 
yeah I have audhd its in my bio
well time to learn bro
i have a job tho
Bro censor that
yo claude is slaving for me rn holy crap ty so much @remote phoenix
jobs
youre welcome big man
claude its good
just after you make something ask him to teach you
so you learn
who
Hey uhh beginner here was wondering how to move a model without setting primary part bc whenever I try to use to pivot or anything like that it doesn't work
well pivot does work
so yeah
show the code


