#code-discussion
1 messages · Page 102 of 1
and usually from what i see, things like this usually have a more compact alternate syntax
but wait that gives an error if it doesnt find statfolder or doesnt find string @brittle pond
we doing too much, i feel like this can be reduced to like 2 lines of code tf
for _, Part in pairs(PartsTouched) do
local Type = Part:FindFirstChild("PartStats") and Part.PartStats:FindFirstChild("PartType") and Part.PartStats.PartType.Value
if Type == "Wood" and not table.find(ValidWood, Part) then
table.insert(ValidWood, Part)
end
end
this'a work
Can someone tell me if this is correct for projectiles?
- Client Fires projectile
- Client creates projectile
- Fire to server for new projectile
- Fire to all other clients to render projectile
- Client projectile hit, Fires a Event to server
- Server does a confirmation check
- Fires to all clients if hit
- If nobody hits then remove on client side if hit or after a certain amount of time
1 and 2 might be switched actually
why not just have the client set it up and have the server create the bullet so you dont have to do alot of that
wym by that? can you give me an example please
whatever is the smoothest looking is what I'm going for
IM LEARNING
Client Input: Player presses fire, input is processed.
Client Predicts & Creates Projectile Locally (optional visual feedback)
Client Sends Fire Request to Server (including direction, position, velocity)
Server Spawns Authoritative Projectile (official logic, damage, etc.)
Server Broadcasts to All Clients: "This projectile exists"
All Clients Render the Projectile (use replicated data: position, direction)
Server Handles Hit Detection (never trust the client)
Server Notifies Clients of Hit or Expiry
Clients Remove the Projectile
i learned to change colors stack and rotate
prec 8 it
I'm just wondering what is the difference between yours and mine besides the client doing the hit detection and the server doing a check on validation
or is that all?
No client needs to send hit data.
The projectile is simulated once (server-side).
Clients only show visuals — they don’t drive logic.
Helps with lag as some load is put on server.
Only the server decides damage and hits (avoids exploiters).
wait is the code section for scripting?
yeppers
ahh i see
The thing is I dont want the visuals to go through walls if the player is lagging
is the reason I wanted to do client hits as well
just more visually pleasing I guess
Client Fires:
Does a local raycast immediately to check for obvious obstructions (like the wall right in front of the barrel).
If blocked, cancel the shot.
If clear, spawn a temporary predicted projectile.
Send shot data to the server (position, direction, maybe timestamp).
Server Receives Fire Request:
Re-runs the raycast from server-side (to verify no cheating).
Spawns the real projectile server-side.
Broadcasts "SpawnProjectile" to all clients with synced data.
Clients Receive Projectile Info:
Hide/remove their predicted one.
Spawn/render the authoritative projectile, now synced across clients.
Server Handles Hit Detection:
Projectile hits something? Server confirms and broadcasts the hit.
Clients React to Hit:
Play effects, damage indicators, despawn projectile visuals.
that would prolly work
so that'll still be waiting for the server to fire to the clients
But I could try it
I wanted the clients to have full visuals if their wifi is bad still but I guess if they're lagging then that's on them lol
I'm pretty neat with everything and nothing should lag for others
You ever do projectiles btw?
Or was this just a good example on how to do it
gng how much should ask for remaking untitled boxing game scripting it
it's Coder()
not coding
should be making a for loop btw if you're gonna do that
or tween it
for i = 1, 0, -0.5 do
Coding.transparency = i
end
it'll go to 0
it's pretty simple
first value is the starting value
then the 2nd is the ending value
and then third value is how much you want to subtract or add
Coding.transparency = 1
coding is the baseplate
The coding variable is the transparency for the baseplate, so when you write Coding.transparency(transparency should be written with a capital T), you try to access the transparency of the transparency if you understand
on the upper bar, press view, and there, enable output
you might need to click on the first image to see the full
takes a few days chill
bum
@spice summit
do u per chance have your own game framework
i did.
i ditched that joun for an opensource one
which?
ima sound basic af but knit
hold up u not even in the server
oh ok, at lesat ur doint that
i hav eno diea how a framework supopsed to wokr
im just making templates for games
how do i make clickdetector work while holding a tool?
cause rn if i have a tool out and i try to click it, it does nothing
i need to unequip the tool
Try open unreal engine you get overwhelmed🤣
lol try blender u cant even use wasd without doing a lot of work
im getting overwhelmed
Middle mouse is dead thanks to blender
Just take it section by section you get hang of it
Making games is most fun job in the world enjoy it
If you guys were to relearn backend programming from scratch, how would you do it?
You dont front end bumch of apps then slowly migrate to back
Backend is not complex just more puzzeling you can keep it stupid simple and build layers
Ef is mvp though makes migration night and day
not that hard he says
guys is it bad if i dont use any fancy framework like knit and I just write my own code?
or will it eventually hit me in the back
idk what that is
i believe you just wait 😄
congrats tho
hopefully i get accepted too
what are you getting accepted to
I dont understand the image you sent
a skill role bro 
where do i apply
theres an information channel for this
not really
it just depends on how you want to write your code
good luck
im starting to use modules and whatnot but I started learning coding without using these complicated things and now its hard to switch
in my previous game I only had like 1 module
can sm1 gimme a road map for learning roblox scripting. I want to make money by doing hiring and stuff . i have watched brawldevs beginner and a bit of advanced tutorial
guys my game is lagging too much can someone help me?
it's not bad to not use a framework
but it is bad to not use modulescripts, even for things that seem like they could just be a localscript or script
if you make everything a modulescript it makes interscript communication much easier
yes
dont use chat gpt or free models
probably uninstall the bitcoin miner from ur computer, and the roblox hacks too
can we use chatgpt premium
i mean you can use chat gpt
just you know
like organize the code
actually know what it does
i meant in a dont just throw it in hoping it works way
🤑 🤑

It's not compulsory to use any extensive framework. All that matters is that you get the work done according to how you want it.
Even me as a web developer, I don't use React, Tailwind CSS, or any other fancy frameworks. I enjoy the satisfaction of coding in pure languages.
Nokotan would never. 💀
not using react? - error
not using chatgpt? - fatal error
use a framework if it helps or speeds it up, if you can do it faster without learning it then do it that way
lua better
to make phone apps?
lua is the most mid lang
🫃
🥀
we use angular with devexpress
I'm a lot more faster using vanilla languages. Learning a framework would take a while, and it'll only consume my time.
But if I ever want a job at a tech company, I'll jab myself with a load of IV drips to help me stay determined as I learn React.
-# Those reusable components annoy me, but it's a must if I wanna learn React. 🤷
BRO WHY IS UR LINKEDIN ON DISCORD
ACTUALLY UNINSTALL
he wants a j*b
because majority of jobs are via linkedin?
bro on discord
❌
are we fr
majoriy of clients use discord
In this modern day, most jobs are on Discord.
linkedin is literally banned in my country since 2016
bruh
You answered your own question.
haha thanks
weird
You're welcome. 👍
You don't say.. Really?!
its best place for developers to meet clients
why does linkedin have ui from 70s🥀
no
it it aint broken dont fix it
it is broken🙏
client pay over 5k a gig?
what is that currency 🙏
talk to the hand
Probably because 60 year-old back-aching elder senior developers who rely on C++ often go on there for accessible work.
And that's the grand majority by the way.
jkjk
Don't worry, I'm learning C++ as we speak.
And it's really cool, I actually know the backend.
c++ = 🤯🔫
You rock!
oh this guy
he hasnt reached the pain point yet
the pain is the fun
Don't worry. I am very well-aware of what's comin'.
Until it comes, I'll cry it off, and learn it anyway.
Just like extended maths 12.
I could've learned C first, but my mind was too reluctant, so I selected the bear instead of a wombat.
Amen.
was with the memes good lord 😄
fr
its new night its time to open roblox studio
Okay, good luck as you code, debug, regret life decisions and repeat the cycle. 😅
That's my life too as a web developer, I follow the exact same formula.
I sometimes feel like an imposter, like I don't know what I'm even writing.
trust me i know all too well 😄
but front end is more annoying because your ticket goes from commit->Implement->Reviewed->Test not okay button is ugly
and repeat the cycle
pull request please somebody review!
I forgot how to check for two keys being pressed at once to do an action 💔
average roblox exploit script
indeed
not sigma
real
Final cramming before the calculus exam be like:
bools, if both of them are met then it can do the acting
thats true
can anyone explain what i did wrong , i never coded in my life , just watched what someone did in a video
or im thinking of smth else
i never coded in my life , just watched what someone did in a video
there is your issue
wym
i am fucking learning too when i watch videos , i just want to know what i did wrong
your capitalization
where
if you get red lines under text that means it will error
you have to keep things consistent
like Player and player
as well as checkpointPart and checkpointpart
chill
so what should i do, cuz in the vid it was like that
wait nv
do you know scripting basics
no
how
where'
where do i learn
and while im learning i wanted to build a little obby with my friend
you have a big library infront of you already
and theres a fucking issue that i cant solve
you can research anyways
ok i will learn with my friend , but what was the issue that wouldn't let us get our checkpoints
what should i change
im d1 at this shi
yes very
how ocme i dont have catshadow
click the searchbar
castshadow i mean
o ty
bro noone still helped me with changing the script
whats a string rlly
i watched this and i still dont understand the point of a string
is it just single and double quotations
a string is just text
both are correct syntax
whats a syntax
it’s just preference
like the building blocks of code like: if or and else elseif local
idk what that means but i will understand it someday
look up code academy
im learning datatypes rn
and do the lua course
is it pay for
i think it’s free
Lads, quick question: how can I make a reliable character hitbox WITHOUT using .Touched? ShapecastHitbox is quite unreliable for this
numbers: anything with numerical value like 1,2,3,4 etc. bools: true or false. like a quiz, it’s right or not. strings; text, like letters, symbols and numbers(the numbers don’t hold numerical value)
make a hitbox part, clone it and weld it to the player
You use muchacho hitboxes duh
mhm
Then use .Touched anyway?
That's what I'm currently doing
A welded hitbox part
yes
Maybe a spatialquery
But yeah it unfortunately works too well
it’s either a crappy one or no one ❌
what’s the use
This is for detecting when a vehicle collides with the players btw
I honestly do not know
But it’s good for hitboxes I think
ur doing a commision?
use collection service
and whenever it touches the car make it hurt you 😱
or smth idk
Wouldn't I need .Touched to process a spatial query?
it doesn’t need a hitbox
They're not mutually replaceable
Idk how a spatialquery works 😭
I'm using collectionservice for all vehicle parts
I'd rather the character detect the vehicle collision
Instead of a quadrillion .Touched connections existing
Use math
Using big words to sound smart ahh
Spatial query does indeed sound like big boy smarts
And yeah
If only there hadn’t been a follow up question 🥲
What about that follow up chess game
You just don't follow up huh
Say less I’m down
No cheating 💔
Run it back on puzzle battle??
lol
I’m a man of honor never cheated in my life
put it on the grill and bumper, your not getting in collisions on the side of the car
Still
A single character hitbox
Way better imo
It's the same idea
not really
I've tagged the grill and bumpers already
is this line a gun game
as a commision what is the avg pay u get?
I assume client side is also preferable
I barely do them
I don't think I've even done 5 in total
I principally make my own games
🔥
pop yo shi
damn
Should I handle hit detection on the client?
Or not even bother
I'm also using a ragdoll
Which is server sided
wouldnt that be extremely vulnerable
You can't control the client's physics either way
Exploiters are goofballs
They're free to modify their own physics while still being replicated
You can surely use a bit of math to reduce the sort of physics they’re abusing right?
No
You just have to check for things like their velocities and height etc
You can’t check velocity?
You can't stop them from exploiting their own physics
Of the player?
Yeah but you need to check that ANYWAY
But if I used the speed formula
Regardless of where this is for example
And did it continuously for each player
You can check at intervals
Wouldn’t that stop like the harmful physics?
If it surpasses some ridiculous number then you warn or ban them
Yeah I know but in a loop
Yeah but that has nothing to do with hit detection
What sort of physics do u mean?
A vehicle colliding with a player
Exploiters can move wherever they want
So detecting where the player is can be client sided
Oh yeah
I don’t think that stuff will ever be stopped by Roblox or anyone tbh
Maybe one day if Roblox changes the entire engine it was built on
Or a decent amount
turn on dark mode
can u show me how
look it up
What
I want a group of code inside a function to run at the same time as the rest of the function does. For example the main function loads the egg animations but at the same time I want the sound effects to play, what is happening is when I load 3 at a time, each egg loads, then plays the sound effects then after the one is done, the next one starts, when i want all 3 to start at the same time.
Multithreading
If you use yielding code and you want it to run simultaneously, it‘s your best bet
task.spawn(function()
— your code
end)
Got it thank you
perfect it worked, thank you for the help
You are very welcome
Does chatgpt work for roblox?
yes
wont that make all scripters useless
who do you think is going to use chatgpt
if you have one guy busy writing to chatgpt all day then thats your scripter
Em
Em what
ChatGPT is good at stacking up code filled with bugs
yeeeee
well if ur doing it yourself ur not a scripter lol
ye bro
why does that not make you a scripter
ye bro
because youre not scripting it yourself lol?
youre having chatgpt script it
but im the one copy pasting it and making sure it works
if chatgpt makes an art piece with a mistake and i wasnt an artist i wouldnt know how to fix it
if chatgpt makes a script with a bug i can fix it because i am a scripter
🤦♂️
go ahead get chatgpt plus right now and try to make a game with it im not saying its useless but there is a bit of knowledge required to make it cohesive
if you have no scripting knowledge you will be stuck in chatgpt all day essentially... learning how to script
Only 1k$ for setting up datastores!!
I know loads of people with no knowledge of scripting who have entire chatgpt games that are functional
does anyone know a scripter who is good at cashgrab systems (paid with % on games with ccu alr)
What ccu
10-50 ccu
Send the game link here or dms
https://www.xyrx.dev/ all the games on my website are good examples
wym ok it was sarcasm
which game is the % for though
bro youre dumb asf
No one's paying you 1k to implement datastores
why
I said it as a joke because you're definitely not doing it for a "cheap price" and you couldn't have proven me more right
Lmao what do you think is a cheap price if you think implementing datastores is worth 1000$
not dollard
rn the train vs car game but if you can make the stuff a kit I can give you % on a LOT more games (most games I own have get a revenue of 2k-8k robux a day
i meant robux
Dm me I might be able to help
1k robux
kill me bro
Some of the leaderstats show "-" for some reason, could this be a roblox related loading issue for the leaderboard?
the dash means a nil value
datastoreservice not loading data properly
so its a roblox issue right?
are you leaderstats being correctly created?
Someone have good R15 Ragdoll module? Rlly need it pls
yes
is the data store returning valid?
thats bc you don't set base data to 0
ik but he don't SET his data to 0
i did?
i read that wrong
its a possibility lemme see your script
okay ty
when you load data are you giving a base data if your player is joining for the first time?
yes the default value is 0
you could print HttpService:JSONEncode() to debug
it would print the structured data from data stores
guys is rescripting the same as fixing a bug?
if the scripts the problem
what if you're just editing the code
maybe this is the problem?
not restarting
That's a very common issue
There could be 2 things that are behind this issue (Make sure to check them)
- Incomplete Data
- Typical Loading Behavior
variables are used to store references to certain values so that you can use them later
see i dont understand
Or It could be Player Inactivity/New Players
like its storing numbers?
it is like algebra local x = 1
in luau, variables can store basically anything
i had a 48 in algebra
o
so its used to just store something?
well this is what came out of the output the rest of the players are just []
yes
do research on the different datatypes
and learn some computer architecture
it is just to make your script more organized, less laggy and shorter
it will help
i see
it would also help learning a lower level language first
idk what hat is
basically learn how computers work
like datatypes, terminology, how different hardware parts work, bits, bytes, etc
o
with hardware i mostly mean ram and cpu
since u wont really be using the others when coding
atleast on roblox
guys is rescripting the same as fixing a bug (without rewriting everything)
elaborate
if your script is the problem, yes kinda
one of my clients is saying that because I was paid to rescript some systems in the game, i am obligated to fix the bugs from systems that i wasn't assigned to do & I didn't write the code for
then you are suppose to fixe the bugs that are script related
well what was the original agreement
what was the task simply put
No, if you didn't agree about "fixing" then give them their bugs back
version history exists
😔
i was hired for % after rescripting a system
then they found someone who worked faster than me
and the owner said he would pay me off
but he refuses to pay me for the bug fixes
and he says it was rescripting
if those aren't your fault, and you both didn't agree about "fixing bugs"
then try to take the money and get in touch with a staff to ask them about reporting this guy
i asked him to rescript ym game, didnt say system i said rescript my game
and hes charging me for fixing bugs in the game i told him to rescript?
i didnt say rescript some systems
i said rescript my game
rescript as in re create from scratch?
yes rescript my game, i tolf him most of it is good but some of it is very bad
resscript the bad parts and hes charging me extra for bug fixes
ill send screenshot proof of exactly what i said
u said “game “
also later on
you said that the 50k you paid me was like an upfront
after you put me on %
it's best for you both to consult a Mod that is a scripter.
anything I say here is just my opinion
yo on what app did you make this on?
yo guys why does my gui button scale with the pluggin but the text in it not?
Check in TextScaled
its so fun to just mess around with drag detector, i just made a trash picking game where you get paid for everything you put in ur bag that you also have to drag around xD
guys i hate gui
why does my image not get scaled but my button does or other way around
are you using the same scaletype on both
Im using the plugin
that doesnt stop you from checking if its using the same scaletype on both
imageLabel.ScaleType
check on both instances
if they arent the same thats probably the problem
and he says it was rescripting
Anyone know how to fix explosions causing desyncing of other player's characters? (Other people can turn invisible or are high up in air, stuff like that)
Dm me if you can help me with my pet thing that only i van give in a script to people I choose
why tf does that happen
You might have position offset instead of scaled and size got some offset instead of scale
But I'd rather say it's the position offset problem
Easy fix tho
nah when i click scale on the plugin that still happens
If it's 0,100 / scale, offset
You do 0.1, 0
You might wanna do it manually, way easier lol
Why would he
its easier?
thank you roblox for making enums indexed
this one idk how its called
yeah use that one
i did alr
yeah i mean anchor point mb im a scripter
yall are saying to much i dont understand im new guys chill
He obviously did not
imnot talkign to you am i

alr lemme try
make sure the anchor point is that
its not gonna fix it but
ill tell u what to do next
alr my button moved a little but i did it
I'm trying to create a car knockback system
So when you run into other players they get flung and ragdoll
properties ?
The issue is that it doesn't happen fast enough
like this @near sonnet
alr ig ur the pro
What’s the best place I can learn how to script?
it wouldbe better for you to scale the position and size for each of them
and then add a
UiAspectRatioConstraint
that should work
so i create button, use the tool, create image inside of it, use the tool again, then add UiAspectRatioConstraint
na you dont have to re create the button only the UIAspectRatio then
add a new one
before that you should scale position and size
I learnt UI hard way
so first delete all UIAspectRatio
No documentation, pure experimentation
no wonder you think not using the plugin is easier hes obv a beginner
i am
how do i turn of that red thing
whatdahelly
there is no red in this image
but im guessing u mean the highlight
press insert
where
on ur keyboard
found it THANK YOU YOUR A LIFE SAVER
Anyone know how to fix explosions causing desyncing of other player's characters? (Other people can turn invisible or are high up in air, stuff like that)
does fps guns work by sending the client to the server the hit target and the hit pos to double check check on the server or smth else i tried raycasting on the server and it was ass
is my game good enough? i was tryna practice to make a grow a garden game to help learn more abt scripting but i now have a full game basically and i want to sell it. could i make something off this?
yk what maybe u could ngl
show in vc fr
sure why not
i saw a datastore warning when u bought something in the store, do you save every time you buy something?
ig yea
my friend helped with the datastore
the game seemed ok but i was just curious to see it tbh, wasn't really interested in buying it
not too sure
yeah i get it
any place i can find people to buy my game
rodevs maybe
not TOO sure tho
or 'roblox developers'
@wise turtle @ripe plume can u help me find a buyer
no sorry
@ripe plume wait how did u get 10M visits
yeah what game brochado
Guys, how do i get the player current position using OrdenedDataStore in the faster way
"Too many requests"
Theres 2 million keys in the ordeneddatastore 
is roblox down
oh of course that studslop updated
and proceeded to break the platform
servers are atleast having problems
Took an entire day of learning groupservice but I finally got it
wild
howd that take u a whole day
oh
it also checks if you're part of those groups before switching teams
🔥
im so bored i made it so if u click the ground it spawns 1000 parts

make a weather system that uses the clouds in the terrain function
done
🔥
now make it rain, snow, autumn and idk volcanic ash
too lazy fr
ima make an npc
damn
I need to make it faster but this works perfectly
ye
is this good for day 3?
guh boat dock sys guh
now learn instance.new and create and modify the part that way
... im still on the turtorials bucko learning else and else if
im long ways away
still on tutorials on day3?
yea?
you need to start working on random projects
bruh what the heck i mean ill prob finish the turtorials this week
guh
instance.new is actually a beginner method that creates a part from code
Look into it
oh alright thanks ima get to practice but thanks ✌
It's normal if you are only doing a few hours a day
Or an hour
Healthy to do it like that
yea thats what im doing
why da boat sink
hello
I would love to make a weather system but I have zero motivation to make the effects of rain, hail, snow, etc
i made it in 10 mins
😭
thats why im using a plugin for the rain
Saves time
👏
This one has the best rain effect i've ever seen
what in the sigma is happening to bro
I have never made any vfx in my life
same
I've only ever gotten a png made it real tiny and scattered them randomly throughout the world looking like snow
i made an npc that goes towards you and tries to kiss you
James CHarles?
step 1: make ur own
nah im too stupid to make my own vfx
💀 then practice
im already coding isn't that enough 
Coding is fun until you need the assets to make it work
me code fast enough
is cs still practical to take in college?
i can even code rain in 5 minutes 
Depends
css?
@jagged glacier where u live?
I have a bad habbit of coding for 5 days then stopping for like 6 months and forgetting what I learned
im trying to get better at it
I'm not lying tho 
I didnt say u were 🫠
just 5-10 minutes
I did 
using raycast ahh
dawg, is important
I know its uses but I have no idea how to use it
bro really wants me
💀
asia
yeah but its an invisble beam you cant see which bugs me cuz I have no idea if its works
I tried to mess with it once
ofc is invisible 😭
I couldnt figure it out
made wayfindr in like 9 mins is that good or bad
It'd be better if roblox made it visible so I knew where it was going and we could just toggle it on or off
except i have alot of experience with coding since 2018
like beam
to make rain i do like this
oh really?
fair
pos = Vector3.new(0,100,0)
dir = Vector3.new(0,-500,0)
local ray = workspace:Raycast(pos,dir)
if ray then
end
im still using the plugin 
direction is where the pointing at
i only had some because one of our subject
yes
@gilded gyro u're going to study cs or what in college?
u haev some leverage mostly bro
but mostly suckass at math
Okay yall now that I know How
print('hello world') works I need step by step direction on making a fully functional police car with light, sirens, and missles THANKKKKSS
/j
but do u see yourself studying comp sci?
computer science?
computer science more like
ChatGPT Science
but u have some experience when it comes to programmin, mostly cuz of roblox right
roblox is just a tiny spec of what cs offers, it does give you some basics
i do work on godot tho
sometimes
except I didn't learn C#
ohh cuz game dev right?
you do it for fun right?
that's cool
nah nothing really
i should've study programming early in my life lol
?
yo would some one like to help me dev a game on roblox?
how much u payin
%
nah
What can you do why wouldn’t I just make my own game
learned something new and it worked
this uses pathfinding?
Good work 🐱
yo, im trying to fetch data a list of group members name. I do this request and it gives me like 5 members and not the full list anyone knows why?
a https://groups.roblox.com/v1/groups/35234129/roles/214440181/users
thats the request i send
and it onlys sends back like 5 users
does anyone know how to make chat notifications with the new TextChatService
throw in the catmull rom spline
that part of roblox
idk how but
?
u cant
yeah but i want the file
its c++
lol
does anyone know anything about roblox api
yuh
bros not letting me escape
How do I post
I think im dumb cuz time says its increasing but it's skill dark
I thought adjusting the clocktime would work 
yooooooooo
lolll
nice elseif and if statements
quick questions whats the difference between cframes and vector3
A vector3 is just a point in 3D space. It can represent just a point or a direction. It has an x, y, and z value.
A CFrame is similar to a Vector3 in the since that it’s a point and can hold direction data, but it also hold orientation data. It holds a 3x3 matrix of data that represents the rotation and orientation of a point in 3D space.
so to summarize
vector 3 handles position/direction
cframe handles allat but also rotation
Yup
Depends. Sometimes you don’t always need rotation data, so it’s just simpler to modify a vector3. For example, position is vector3 value.. but CFrame’s hold position, and orientation all in one. If you need to simply just move something to a specific location you can just set the CFrame. Sometimes you just want to move it right 5 studs, in which case you’d add vectors to the original position. It really just depends on the scenario.
so cframe holds data and vector3 just does it?
kinda like waitforchild and findfirstchild or setasync/getasync
No
Ehhh kinda but not really.
Vector3 is just a container for 3 numbers: x, y, z. It’s a simple data type.
CFrame is a container for both a Vector3 position and rotation/orientation data (i.e. a full coordinate frame). It holds more data and enables more advanced spatial operations like transformation, rotation, and local space math.
The key distinction is that CFrames represent position and rotation. Their key functionality surrounds advanced rotational operations and data
so i'd use vector3 for simpler stuff so i don't use up too much data
Vector3s solely store XYZ components. These can be used to represent position or rotation, but only in the simplest form, and in one form at a time
use the marketplace for jobs ty
and don't spam
In performance-critical areas, yes
i see then
Sometimes constructing CFrames with only XYZ data can help streamline offsetting position with respect to object-space
Yeah it’s important to realize you can create a new CFrame with only one Vector3 inside of it to store position, or a CFrame that only stores rotation.
It really depends on the specific case to determine which is the best option to use.
yo what should i code for fun
The CFrame class is one of the few classes with a large number of constructor overloads. You could choose to provide XYZ numbers literals in the form of a tuple as opposed to a Vector3
CFrame.new(1, 2, 3) or CFrame.new(Vector3.new(1, 2, 3))
The former is typically used with magic numbers. The latter is typically used when resetting the rotation of existing assemblies
cframe is not a class its a data type
lie
Same thing
not really
Yes, really
not even conceptually
A class is a datatype
a class type is mutable a data type is not
td game
do you guys ever just
lock in
im locked in twin
lie
truth
are u the rollback netcode guy
?
oh shoot
haha we're both in the oss server
yeah im the guy, its going quite well
thats nice
i had to do a bunch of rewrite up until recently
gonna be closing the rollback thread soon cause i got a good groove going
🙏
he added me as a connection 😭
he is friends with half of ross
id figure he'd be that type of guy
friending half the tech server
lmfao
local player = hit.Parent:FindFirstChild("Accessory")
Can I use this to find any accessory on a user?
yup
all accessories are under the model instance
so theoretically
script.Parent.Touched:Connect(function(hit)
local player = hit.Parent:FindFirstChild("Accessory")
if player or "Accessory" ~= nil then
for i,v in pairs(player:GetChildren()) do
v:Destroy()
end
end
end)```
incorrect syntax i think
😓
not exactly, two things:
- accessory should be replaced with whatever the name of the accessory you want to find is
use findfirstchildofclass
ahhhh
yup do that
Omg finally thanks
aren't you just comparing the string "Accessory" to the nil value, not the actual accessory object?
ur not in the green yet
was gonna say this
ur comparing a string to nil
are you doing ray casts?
its a random string, meaning i could put "Cheese" ~= nil and it would still work
hmm
are you doing ray casts?
no
what are you doing
oh thirdly, this:
ur not finding the player, ur finding the accessory
meaning, this code would only remove everything in the accessory, not the player
if you wanna get to the player, you just need to do hit.Parent, not hit.Parent:FindFirstChild("Accessory")
lol what’s the purpose of destroying the character?
No im trying to make a hat remover hence why im looking for the accessory
hat remover, hmmmm
and it works as is
script.Parent.Touched:Connect(function(hit)
local player = hit.Parent:FindFirstChildOfClass("Accessory")
if player then
for i,v in pairs(player:GetChildren()) do
v:Destroy()
end
end
end)```
there’s a property for body assigned positions like head face etc
bro exploded the toilet
this works?
yes
whys it red
are you using a test rig or real players
goodness

testing on myself
test it on other rigs
(if you can)
it will not work
what's the name of that accessory
sorry i meant players haha
your removing the only accessory you have which is a hat
cause im thinking the name of the crown is "Accessory" and that's why its working
it’s not gonna work right
we could provide you with some hat remover code right now tbh
of course i dont wanna spoon feed you
yea
so i'll explain how it works
so you can actually learn and not just get working code without gaining knowledge
sound good @crude quarry ?
The crown is called MeshPartAccessory
yessir
show us the tree in explorer
i’m just gonna spend the next 2 hours helping people with code i’m bored



