#code-discussion
1 messages · Page 85 of 1
yeah it shouldnt look like that
change the formula
i just blindly changed the numbers but when i decrease the power(13) i get too many large numbers and if i increase it i just get 1.1 most of the time
local Min = 1
local Max = 4
local Random = math.random() ^ 3
return Min + (Max - Min) * Random
Have you tried this
no i tried ^5 though
try this
Working on a cool little catalog game
🤞 hopefully i can get it done in under a week
clean
i dont think ill be able to try it now as im outside but thank you so much anyways
if i was to start scripting from scratch what do i do?
YouTube
Who are some experienced and competent scripters I can reach out to for a project?
I'm not a developer myself but I do have some basic understanding of the technical side involved in a Roblox game, so I am aware there are certain limitations on what is and isn't possible.
The project involves 'taking' and 'uploading' pictures in different scenery, environments & locations
- the user takes a 'picture' and everything is captured,
- 'picture' is somehow stored,
- 'picture' is somehow able to be displayed again later
I've constructed a wireframe of the core elements of what would be included in the interface of this system which I've attached below
Is this possible?
Yes
what yall think of the new input action system?
are you able to give an explanation at a high level of how it works?
Lemme pull up ChatGPT rq
So apparently there’s no built in function for saving frames, so you have to do a lot of ray casts from the players camera, make that a viewportframe or something and save it to a table
And have to use distance to determine the return size
interesting
could this help?
Possibly, but I think the problem is that you can’t directly capture a frame image
Also, for the editable image to work it has to be handled by server
Though I doubt that would be a problem
yo i'm 16 and i js wanna make a fun game, if anyone wants to join together that would be cool. im not like super good at coding, I been coding for like a year now but i took a pretty good break. no money involved. just we both learn together yk.
got it
are you like a competent scripter?
Not at all
lf people to give me feedback on my game
hi no one
howcome modules online have like 20 scripts in them and are designed so differently? my systems only take a couple module scripts
cause they know how to modularize
for instancethis is a dialogue system and while yes it does have many features i dont understand why SO many modules...
the second picture it something i have created
is there something i need to learn?
left: roact moment
(never used it)
whats roact
haven't made or read the dialogue system so I can't say if it's too modularized
/ bloated
by the looks of it you use it if you come from other software development projects
single responsibility principle
ed
roact is the react port to luau
guys should i start with building/modelling or animating first
Why do this anyways?
i dont know. Im trying to figure out why use roact instead of the base roblox studio api
I'd much rather hand craft the GUI, then load it into Roact for manipulation
If that's even a thing
exactly
whats the point of roact
it look like, to me, its made for studios who dont use studio
like, game dev groups who use vs code or github
maybe idk
Most of the tools like that are intended for larger teams or more enterprise operations & need version control
VSCode & Git hookups let you push/review changes without needing direct access to the place in studio and still allow version control, forking, branching etc
It puts you closer to formal enterprise software development and rollouts
any1 have a spare m1 system i can have to test animations
do you guys have any pathfinding frameworks you use
I used to think that too but hydration is pretty bad dx. It's hard to explain the benefits without trying both
what
it really depends but most beginners choose building
what does this mean?
srry i dont get the joke
it makes ui components reusable and agnostic
buzz words
literally the most straightforward expression
NO PLEASE
camera go brr
why do we use waitforchild instead of findfirstchild?
like i get that it makes it work but does it depend on functional code
you should use waitforchild if you just spawned in and you're looking for character or something
sometimes findfirstchild will miss it
basically you should use waitforchild if you're 100% sure it's gonna spawn in
findfirstchild if not (or waitforchild with timeout, there's a library for it)
waitforchild has a timeout argument
theres a waitfor library that uses promises for waitforchild and doesn't yield
when you should use wait for child:
- waiting for something that might not be replicated yet like instances in a player's playergui
when NOT to use it
- youre on the server
- anything inside of replicatedstorage (already replicated? i hear mixed opinions but never received a timeout error
note that i said "like"
it doesn't mean that's the only case where something might not be loaded
i see
findfirstchild wise, i dont use it often
there are some cases you would but
those are self evident most of the time
i have 0 waitforchilds
cool
dont use waitforchild.
yielding ur build for 0 reason
name 1
u dont need to wait for playergui so thats not a usecase
yes you do
ur entire app should be operating on atomic items
then ur architecture is shit.
not a deflection, i just don't need to use waitforchild
specific to you
u shouldnt have a single yield in ur core game loop
specific to good devs*
"core game loop"
how it feels using ecs n whatnot
i dont think u know what a game loop is
Anybody know why this is happening? Is there something with welds that can effect this? It's not the scripts since I tried removing scripts to do with the plane and it STILL does this thing
this might be the worst thing someone has ever asked but for loading screens do we use waitforchild
search up contentprovider, preloadasync
yeah il send it through
shit i cant, look up brawldev on youtube and then vector3 he has one for cframe, if you like i can dm you the links
I'll just look it up
For my loading screen, I have about ~2,000 lines of set up on the client and about ~150 on the server, so I load the loading screen in a standalone script in ReplicatedFirst so it renders right away, then delete that GUI when my cleint is down loading all it needs.
In other words, use a script in ReplicatedFirst to build it and place it into playerGUi, then choose another script that should only be finished when everything is loaded and have that script delete the loading screen.
I've very rarely seen cases where my client is finished and the world hasn't loaded.
code help ass gif
lets not ruin code discussion
why does roblox code assist give these suggestions
roblox spitting facts
AI slop that Roblox crammed in
How do I task.spawn a modulescript function?
I have a function setup the sorta standard way, so in my script I can call ModuleScript:TheFunction()
but thats not like how task.spawn works
like thats not what it takes
google has not a lot of help
task.spawn(function, self)
task.spawn(module.Function, module, ...)
Or
task.spawn(function()
module:Function(...)
end)
Remember that Table:Function(...) is syntax sugar for Table.Function(Table, ...)
You should not be using the colon operator with your functions unless you intend to make use of the implicit self parameter
Luau, by convention, reserves that syntax sugar for OOP
Interesting. This is code I wrote a while back so it's using colons for no particular reason, didn't know i had to pass table in that case
thanks for the info
thats how the colon operator works
colonoscopy operation
vro
Is there someone here that's super knowledgeable on threads?
I'm having an issue that isn't something I can debug through the console.
Wrong channel
how do i turn this on
function RandomNumber(Min, Max, X)
local Random = math.random()^X
return Min + Random * (Max - Min)
end
Hi, I am trying to make a function that gives me a random number between Min and Max but i want it to give bigger numbers less often, I tried this but i just cant find the exact X i want, if i make it lower i get large numbers all the time but if i make it higher i get numbers really close to Min most of the time (like Min + 0.05) Could anyone help?
I would either debug every line or check the logic of when it gets closed; the thread
do you know any other way to achieve this other than this method
because i think it works without a problem but its just not what i want
you should try X between 1 and 2 I think?
thats probably too low, it always gives me big numbers
something with a log maybe?
r = math.log(1 + 9 * math.random()) / math.log(10)
You need to be more specific about the distribution of your values
i am really confused 😭
im just trying to make randomly sized fruit like in grow a garden
do you have any idea how the randomness in that game couldve been made? @willow marsh
I think they are using a truncated Gaussian
You can set μ to 0 and change the σ
function GetRandomNumber(Minimum, Maximum, X)
local RandomNumber = math.random()^X
RandomNumber = Minimum + RandomNumber * (Maximum - Minimum)
return RandomNumber*math.random(90, 110)/100
end
this kind of solved the problem
Searching for a professional UI designer for my basic tower defense game. If you dm me i can show you what type of ui i want and i can even give you some leaks of the game. Payment will be a % of the game tho.
wrong channel
yoooo a fellow ultrawide user
if i were to create a queue table of builds for each player, would i create one large table that has every player in the game's userIds and the have each of those UserIds be a table that have their queue, or would i do it differently?
it would probably be easiest to have one big table the has user ids as keys and their respective table as the values
ohhh thank you very much
Waut no nvm
Yo guys those who develope to buy their dream car tell me what car you wanna buy when you get rich
A toy yoda
who the hell is developing on roblox to get rich
anyone know how to make an image be forced to an aspect ratio WHILE covering the whole screen (aka, the image gets cut off rather than blank space on the UI'

You mean toyota right
You change the sizing mode to like crop or something
Not toy yoda
Toy yoda
oh my god my dumbass was tinkering with UIAspectRatioConstraint

Thank you my goat
Hey anyone familiar with the game trade tower can tell me why its still up ?
Isnt it basically gamblin
Codecussion
I am trying to create a buildQueue for my building game.
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
PlayerTable[player.UserId] = {
}
print(PlayerTable)
end)
end)```
now to create the build queue, would i create ANOTHER table inside the playerid's table called buildQueue then in there put their builds? or would i just put the builds straight into the playerid's table?
i dont see a point in having another nested table. so i would just put the builds in the already existsing table
what tf
What are you trying to do?
Hi there, I'm currently learning about data stores and following this tutorial:
https://devforum.roblox.com/t/datastores-beginners-to-advanced/1275421/1
I've made it to the point in the tutorial where it explains about retries with the get function. The author mentions something about budgets, which is why I'm here: What is meant with budgets, and why are they used? Here is the line I'm at:
We will add a function that yields if there isn’t enough budget.<
Hey! This tutorial will teach you about regular DataStores (I won’t include OrderedDataStores, but they are pretty similar). DataStore Version 2.0 won’t be included in this tutorial either. Over the course of this, we will script a DataStore (that will hopefully be safe). Important: This won’t be as safe as DataStore2 or ProfileService...
reading from the docs, it says it returns a number of data requests that the current place can make
Hmm, so it's supposed to keep the loop within a limit?
Probably, yes. But after you've watched a video, maybe consider creating a small project yourself to reinforce what you've just learned. If you can't come up with a project idea, that matches your skill level, perhaps try asking an ai for a project idea.
from what I can understand, the author made a loop so that whenever the budget is less than 1, its gonna wait until it isn't less than 1
can anyone help me learn Tween?
Hmmmmmmmmmmmmmmm, but what is a budget, in this case? And does roblox just automatically increase the budget count?
I think its like a counter for how many requests you can store data using roblox's api
I'm not a datastore expert tho
I can't, unfortunately. I would, though (I do not have much experience), recommend either finding a video about it (there are probably ones on youtube), or looking it up in the documentation (pretty sure it has something about tweens). If there's something you don't understand, try to ask here or, maybe, an AI.
Okay, thanks for the help Sumbadee.
also I think roblox automatically increases the budget count that's why you saw in the tutorial that it just stays in the while loop
am having a problem learning return
Hmmm, return? Could you please provide some more context? What part of return don't you understand?
let me show you what i made.
it will return out of a scope, if inside a function it won’t execute the code after
local function hi ()
print ("retunr is so hard im omniying it rn")
return "this is so tuff"
end
hi()
local thisisMyfunction = hi()
print (thisisMyfunction)
is this what return does?
The function then returns the string "this is so tuff". This means that whenever the function hi is called, it will produce this string as its output.
so it prints when the function did its job successfully
Return exits out of the scope. If you add a string,nil, boolean, thread, integer,nil value then you can obtain that value when calling a function for example.
So you returned a string value "this is so tuff" so that you can access to it
im a bit confused...
"hi()" is a variable for thisisMyfunction
so when i print thisisMyfunction its returns "this is tuff"
?
A scope is a block of code. When you create a local variable at the start of the script, you can access that variable in functions because is inside the whole script scope.
Ok
You can visualize scopes
With the Arrow down button at the left of script lines
The code inside it Is a scope
If you create a local variable inside of that scope, It Will be accessible only inside that block
ok i understood scope thank god.
but returning is confusing, i am currently wathcing episode 6 of devkings tutorial
Now be aware that local variables outside scopes are only accessible / recognized by Lines below them
So if you have a function above a local variable It Will not be able to recognize the local variable
DevKing is so bad
so if i put something over a local variable it will not recognize
who do i watch
I don't remember now but there Is a guy
nah he good
i started learning from his back like couple years ago
brawl dev?
OG alvin blox and devking 🙏
i really im trying my best to understand scripting because i promised my friend who is currently an animator he's still learning but im trying to make a cool game with him
like funny projects
how do you like tutor vc or like tips
vc 1 on 1
if ur interested we can talk more in dms and i can explain my service to you
i dont do that kind of stuff because i currently dont have a mic.
how would a person get a pet simulator like pet to be at a fixed position rather then purely following? i want to make a system where they can sit on your shoulder but most code ends up having them lag behind the player and usually slightly rotated. i want them to be fixed on the players shoulder, always pointing where the player points, but i also want the ability to give it combat where they can sort of fly off your shoulder attack and then return to your shoulder. how would i do that?
ill think about it.
CFrame and offsets that you dynamically change
this or welding
ill add you and think about it aight?
Sure
anyone here want to make a game with me? we can come up with the idea, it sounds stupid ik, i am not forcing anyone and also i got no robux but we could maybe make the game go viral with social media, we will split the 100% of the game earnings in half, just need a scripter
Hi, does anyone know how to get the image id of a decal using an api wrapper (like openblox/noblox)
Me personally I learn scripting with documentation and courses
ive heard he's good
can you dm me all the docs for beginners
Roblox dev forums
the best way to learn imo
Can someone help me out whit this? it keep saying attemp index nil whit 'position'" how should i fix?
Are you sending two arguments but only have 1 parameter?
And you don’t use player anywhere in the clientevent
ill try documents because many of you suggested it
its because its a roll system the local script is attacched to a textbutton (idk if it was this you meant)
To clarify, you send player that triggered the event and the a sukuna model?
You got 2 parameters that you send to the client. You only call for the First, which is the player, therefore can't adress it as position. In the server script, the 2nd argument should be sukunaclone.position, then in the client call whatever you want as the second argument
could you send me some docs for scriping i should learn first
Man if you don't want to pay for courses then Just use youtube brawldev
aight
how did you learn?
I don't like youtube because youtubers tend to gatekeep info and also there is no youtuber that covers all topics but courses do and the teachers don't gatekeep
And ofcourse since you pay the teaching quality is better
so brawldev or devking or alvin
Devking and Alvin are outdated
so brawl
ill do brawl and try my best
I paid for courses
Then I learn deeper by myself with docs
Roblox documentation
It covers all that there is in the engine
ill try my best with brawl dev ill see how it ends up
some people have wathced brawl dev and became very good
which is a good sign
😂 sure average newbie after 2 days of coding
Hi I’m looking for someone who’s willing to help us script in our JoJo Anime game we’re trying to make, we currently have a Map Builder, 3D Modeler, Animator we mainly just need an Extra Scripter to help
My code still faster than urs cuz it executes less line just naming variable fancy dont makes a code better idk what u try na show by showing me this script
Hi there, does anyone know which difference it makes to use task.wait() instead of wait()?
No, just use task.wait()
Task.wait() is new and precise
Okay, thanks for the responses.
@fluid galleon ChatGPT is most certainly not a minor
Wait() is legacy it was in old roblox and its not as precise as task.wait()
Minor 
lua ignores whitespace. they run at the same speed
What
I’ve been coding longer than you
🤣
chill out bruh stop talking with ego, variables dont make it fancy, it makes it organized and more readable
learn from it rather than defending ur bad habits, and yours isnt faster the difference wouldnt even be a couple of nanoseconds
Colors dont match up well
Look at a color wheel or some shit
is should store the user id as a 56 or 48 bits number? store it as a 64 bits number is really necessary?
@somber vault well how does ur ui look
Only screenshot i had rip
dang
I can help u with making smth better
Guys this is okay?
i reccomend you use raycast hitboxes or workspace:GetPartsInPart()
rather than .touched
weird question for a roblox dev server, but does anyone have a good javaScript tutorial I could follow? (got school project coming up which will grade higher if done with JS instead of block code lol)
how far would 8 ad credits a day get you. how many ccu
Waste of robux
nothing is a waste
Stfu roblox ad system is a scam
anyone have the time to personally help me get better at coding? (I know till DataStores)
sure
you can be twist 3.0
what does this mean
dw about it!
so ur not actually gonna help?
i'll help
what's the script u need
I'm paying $100 for a scripting job so dm me if ur down
i got about 500 ccu off of 12 ad credits
Do u have any ongoing projects
Yo guys, I have a newbie friend who asked me about the basics of scripting.
I wanna ask if you agree with me or not about this.
THESE ARE JUST FROM MY PERSPECTIVE AND NOT CONFIRMED BY OTHER PEOPLE
- Learn about Variables
- Learn how to locate something in explorer aka getting something from explorer.
- Learn about properties and how you change them via script.
- Learn about :WaitForChild() and :FindFirstChild()
- Learn about luau mathematics. Simple math such as plus, subtract and else.
- Learn about If statement
-
List of useful things to know while learning
- Task.Wait(Number) or Wait(Number)
- Types of values, which mainly have | Number, String, Boolean, and Object |
- Use print() to debug or for testing while trying to learn about something. So you can see results in output
-
Side quests for you to learn after knowing those basics
- Events, usually used to connect a function.
- Client and server difference.
-
After knowing the basics, those are advanced you would first look up to.
- Remote Event
- CFrame
- DatastoreService
no
Rlly? Which part do you think it should not be there?
add for loops
Ohhh yeah. I should have remembered that.
guys, anyone know why my in game credits would reset if I get promoted through the group rank via api?
can someone pretty please explain to me what this means?
local function ToggleRunning(input, gameProcessed)
if gameProcessed then return end
if input.KeyCode == Enum.KeyCode.LeftControl then
local humanoid = getHumanoid()
if running then
humanoid.WalkSpeed = humanoid.WalkSpeed / 2
else
humanoid.WalkSpeed = humanoid.WalkSpeed * 2
end
running = not running
end
end
here's text-version for those who dont like reading screenshots
ur using a attribute right?
or a value
and running is the name of it?
no
i read something and thought of this
and it worked but i don't know how it works
learn > go with it
like does it naturally has a true value or something or no set value?
and it changes it's value depending on the player speed when it's not holding ctrl for the sprint it wil say not running but when it does it will say running
u can play the game
go on ecplorer
then ur character
scroll down and look at it's attributes
or maybe inside
it might be a value
it basically sets running to the opposite of what it is
so if running is true then it sets to false
and vice versa
oh
Thank you guys for the help very much!
someone here is a good coder in lou i have some questions
okay ask then 💀
Yo is there anyway to automate robux transaction from my acc to player acc for reaching certain milestone
this is a terrible plan of learning studio
if you think that this is acceptable then you yourself must be a newbie and should learn a lot before teaching others
the player would have to create a gamepass and then you would need to interact with a api to purchase the gamepass
do you know any api that does that i coulndt find it
Hello, i have a dictionary in which i need to change a variable (it's in a datastore), and i didn't wanna update each variable manually to false. I tried doing this though pairs, it changes the stated value to true but it doesn't change the values from pairs loop to false. What's my mistake? it didn't print out any
I kinda need help, I don’t know how to start scripting etc, can any pro dev/devs give me advices?
is this unspecified behaviour?
local x = { z = true }
local y = x
x.z = false
x = nil
print(y.z) -- false
since y isn't a copy of x, it's a pointer
u have to do oldTable[name] = false instead of val = false
so i can't use pairs?
yea
it points to the table
but how that's the question
depends what value u want to change
i know i can make them false manually but my script is already 508 lines long
there are only booleans
for example if you wanted to change Orange to false u would do oldTable["Orange"] = false
just use the for loop then
and ignore the indexes u dont want to change
can u describe with more details pls i don't understand
this code is correct execpt val = false should be replaced with oldTable[name] = false
won't i have to specify each value in the for loop then?
ok ill give it a try ty
that code will set every name to false besides Orange
not sure if thats what u want or not
yes it is
alright should work then
with this
yo if youre new to scripting, even if you haven't even touched a script yet. dm me friend.
why tf is your code editor pink
problem?
my eyes would burn
whats wrong exactly?
for some reason playsound is nil
wait do i have to write this for each name..?
sorry for me being dumb
just replace the line val = false
maybe cause your doing PlaySound:PlaySound()
💀
just create a instance.new sound and set its parent to the part you want it to emit from.
and it should be playsound:Play()
yeah do that then parent it to soundservice
and then play it
how can you see the code
maybe hes dyslexic
i feel like my eyes would burn
not even talking about the font, as I also have a custom one
just the pink on pink...
wdym it looks fine to me
my eye are buring reading that code
awful code + fire script editor theme
mid
@honest pagoda
Finding Type Errors Going To Take LONG
who is a good scripter that can solve me a small quick question
Hello, can someone explain why nobody gets the win, even if you're higher than Y-level 97. I'm bad at scripting.
use cascadia code font
is it good?
I like it
show
the y is probably less then 97
i dont think so roblox has it
oh you can't put custom fonts
that sucks
u can
No, I checked it.
add a print statement where it increments the wins
it should be < not >
y > 97 means y is bigger then 97
he wants to check if the y is higher then 97 💀
ye
ohh
i read wrong
all g
The script doesn’t add wins because it can’t find the players "Wins" value. Check that "leaderstats" and "Wins" exist before updating.
he probably does leaderstats in another script
have u checked for errors and added that print statement yet 😭
ye
add this under local y = player
print(player.Name .. ": " .. tostring(y))
if y > 97 then
try this
local leaderstats = player:FindFirstChild("leaderstats")
if leaderstats then
local wins = leaderstats:FindFirstChild("Wins")
if wins then
wins.Value = wins.Value + 1
end
end
this will print if there is any player above y 97
Show us please The Console logs !
bro i been doing my GeometryUtils for the past 4 days 😭
Ai but i gtg thanks for helping i will figure it out eventually
^^
How can I give the player a custom avatar from the server? I'm not talking putting a starter character avatar, I've already created an entire avatar instance, and I just want to put it on the player how can I do that?
dit is duidelijk chatgpt bro✌️
Idd🤙
Precies
destroy the old character and set the player.Character to the new character
it already does that automatically because of the 'and'.
so that can't be the problem.
Will the camera adjust too or na cause Im tryna do it from the server
i need a dev for my game ill give head admin
yes it will adjust
yeah many times
if the camera doesnt adjust u can just adjust it manually
Well you’d need to adjust from the client though which would mean additional cross script communication
Thank you I’ll try it
Does it have to match the players name?
yes
so u paste a clone of the char into workspace, name it the same as the plr, delete plrs char and set new char as their char?
yeah what i tend to do is to freeze the camera with a renderstepped loop when you fire to the server to change the character and then when its changed fire to the client to unfreeze the camera
so the camera stays in the same position
as before
yep
set to scriptable and then just keep setting its cframe to cframe it was at when you fire to the server
and then just disconnect the connection when u wanna unfreeze
yo I lowkey need testers for a game I made idk what im doing wrong, idk what I need to add or change can sm1 help out?
So you disconnect it when the char is destroying I’m assuming?
Plr.Char.Destroying
or na
no disconnect when the character is fully changed
i just fire to the client
to unfreeze
so you fire to client twice to freeze/unfreeze?
no so what i do is freeze, fire to the server to change character and then fire to the client
or if u dont wanna fire to the server
then just fire to client to freeze/unfreeze
Oh you’re detecting the change on client
In my case I’m wondering if u can fully do it from the server
if i wanted to have a character selection
then i would have to fire to the server
to change the character
for example
yeah u can do fully on the server
but u would have to fire to the client to freeze/unfreeze the camera
I cannot control the players camera from the server no?
no u cant
thats what I’m thinking some communication is needed
Well the character resets once the player dies right?
unless I set it to starter plr
psure if u change the char of a player, after their death it resets to their original avatar
yeah u will have to turn off character auto loads
and load the character urself
when they die
I’m trying to change the players avatar to a custom made avatar
Easier way would be just put it locally as starter player
It’d be replicated right
yes thats the best way
when using a humanoid:xxx thingy in a touched event it onlty works once how do i make it work more then once/
but if you want to change the character mid game then u gotta do the other method
ah well prolly just gonna do that, I was thinking if there was another way
Yeah true
Thank you it was a pleasant chat
learnt a bunch
local TargetPoint = Target.Position
local Humanoid = script.Parent.Humanoid
local RootPart = script.Parent:WaitForChild("HumanoidRootPart")
local Debounce = false
local function MoveCommand()
Humanoid:MoveTo(RootPart.Position - Vector3.new(0,0,RootPart.Position.Z - TargetPoint.Z))
end
MoveCommand()
RootPart.Touched:Connect(function(hit)
if hit ~= game.Workspace.Baseplate and hit ~= Target then
Humanoid:Move(Vector3.new(4,0,0),false)
end
end)
``` the touched event only works once
no problem
Why are you checking for whats NOT supposed to hit it
why not check for what u want it to be hit by
so it can turn around
OHHH
im stupid
oh ur trying to make it so u turn around when u hit something?
i would use raycasting personally
I hate when people post just a bunch of code with no explanation of what they’re trying to make and want us to help
jus use Humanoid:Move(...)
ur using MoveTo
cgheck again
real they just send the code and say "how to fix"
its move90
if u want that player to follow a path or something then yes use MoveTo
i literaly said why does the touched work only once (with humaoind with rootpart it doesnt even work0
but if u want a fast push just use Move
I want to help them but I’m unable to decrypt the goal they want to achieve lmao
have tried adding print statements
i dont debug(ik im a failure0
well u should
also you are calling humanoid:MoveTo(humanoid.RootPart.Position) before the real MoveTo(TargetPoint)
yo is it possible to expand a dropdown in the explorer with a plugin? im trying to expand workspace bc im inserting objects into it with plugin
move rotates the char and that is what i want
moveto moves the char move() roates the char
the first script i sent was by mistake
the orginal script i meant to sent was ```local Target = game.Workspace.Target
local TargetPoint = Target.Position
local Humanoid = script.Parent.Humanoid
local RootPart = script.Parent:WaitForChild("HumanoidRootPart")
local Debounce = false
local function MoveCommand()
Humanoid:MoveTo(RootPart.Position - Vector3.new(0,0,RootPart.Position.Z - TargetPoint.Z))
end
MoveCommand()
Humanoid.Touched:Connect(function(hit)
if hit ~= game.Workspace.Baseplate and hit ~= Target then
Humanoid:Move(Vector3.new(4,0,0),false)
end
end)
this one works but the touched event works once only
You call MoveCommand() a single time, as soon as the script runs. After that MoveTo is never called again
it still moves but it doesnt rotate again
Uh Ai
im pretty sure you would have to select a child inside of the instance your trying to expand to make the dropdown expand (using game.Selection:Set)
i think that can help you
tried
which on
yea i just figured it out
someone just told me this
but thx
did u try sourcegraph cody or cladue
oh alright
gpt
oh no wonder it didn't work
@uneven crown
local TargetPoint = Target.Position
local Humanoid = script.Parent.Humanoid
local RootPart = script.Parent:WaitForChild("HumanoidRootPart")
local Debounce = false
-- Function to make the character face and move towards target
local function MoveCommand()
-- Calculate direction to face
local direction = (TargetPoint - RootPart.Position).Unit
-- Use Move to rotate the character (this preserves Z position)
Humanoid:Move(direction, false)
end
-- Initial movement
MoveCommand()
-- Handle collisions
Humanoid.Touched:Connect(function(hit)
if hit ~= game.Workspace.Baseplate and hit ~= Target and not Debounce then
Debounce = true
-- When hitting an obstacle, move right
Humanoid:Move(Vector3.new(4, 0, 0), false)
-- Reset debounce after a short delay
task.wait(0.1)
Debounce = false
-- Resume original movement
MoveCommand()
end
end)
-- Optional: Update movement periodically to ensure character keeps moving
game:GetService("RunService").Heartbeat:Connect(function()
if not Debounce then
MoveCommand()
end
end)```
here
tell me if works
@uneven crown try this one
local Target = workspace:WaitForChild("Target")
local TargetPoint = Target.Position
local Humanoid = script.Parent:WaitForChild("Humanoid")
local RootPart = script.Parent:WaitForChild("HumanoidRootPart")
local Debounce = false
RootPart.Touched:Connect(function(hit)
if not Debounce and hit ~= workspace.Baseplate and hit ~= Target then
Debounce = true
Humanoid:MoveTo(RootPart.Position)
Humanoid:MoveTo(TargetPoint)
Humanoid.MoveToFinished:Wait()
Debounce = false
end
end)
Humanoid.MoveToFailed:Connect(function()
Debounce = false
end)
u make or i
nobody likes ai slop bro
show me ur games again
Ai just to show u chatgpt is powerful
me too but desperate times call for desperate measures
Ai can be used for scirpting?
yes
?
do u know how to script
do u know how to script
ofc i do 💀
how many years did u waste laerning
yea
lmao
tell me how many years
don't say waste
Any tips
TELL ME
it isn't a waste
ai is shit at luau
ai will never surpass humans
4 years
waste?
u wasted 4 years to learn how to script
how is it a waste
ai can do the asme
how 💀
good luck waiting another 5 years so the AI can be as smart as a S1
CHECK DMS
you can but it will be unoptimized
yeah thats what im saying
there will be alot of mem leaks
u can make advnaced games
It'll just be broken
also
he should just quit
AI is not great at scale
check dms
if you think that just quit
yes, and just as you about to finish the game you look at the ping and memory usage and u see over 200 ping and over 3000 memory usage😭
no need for you to waste space here
Idk how you could try to coax AI into writing good code
@uneven crown did it work?
nah same as mine but im trying to understan more about move9)
you'd have to try to get it to comprehend and factor in the full scope of a codebase
Which its not good at
i mean the one i gave you
yeah it has the same output as mine works once only
touched event are soo weird ig thats why raycast more famous for bigger game
how to learn lua
True!
.touched is very scuffed
What is wrong with Touched
yt
Other than being partially handled on the client
which is fine as long as you're aware
Its unreliable and inaccurate
it works weirdly
I don't know, it fires pretty much all the time on point
hey. I had an issue where this didn't work. There's a dictionary that i need to update in a datastore, and if a value becomes true the others need to become false inside of it. So a guy told me to put oldTable[name] = false instead of val = false and it worked. Now can someone explain why? cuz i didn't get it, like in both val and oldTable[name] i am supposed to get access to the variable's value am i not?
TouchEnded might but I've never had Touched fail
Well my hitreg has a lot of client stuff too
its shit
@uneven crown bro i am so dumb, did you even try to add wait()? bcs it might overide it
it doesn't work with tweens...
It's a physics event
that's why
Really need some help with my code, I am using these 2 open source scripts 1 is a head movement script the other is a replication script from the forum (linked)
https://devforum.roblox.com/t/stupid-simple-fast-character-position-replication/3162721
Tired of having a big delay between players in your PVP experiences? Even with good ping? Try this! Less than 100 lines (no huge libraries of any kind !!!) Most likely requires no changes to server code (server side hit reg is UNTOUCHED) Tested with low fps clients (Down to 5 fps!), still responsive! No changes have to made with the charact...
Why would you need to detect two anchored parts touching
i made one but its kinda scuffed so yeah
oldTable[name] = false ?
less and less and tween is good
:<
though there's a solution, u can either use GetTouchingParts() or GetPartBoundsInBox() (though i don't really know how the second one works)
I mean sometimes
getpartsinparts thingy works aswell
anyone know how i can make the server wait for the profile to load in this
-- Sync player data
local Profile = DataManager.Profiles[Player]
if not Profile then
warn( "Profile does not exist" )
return
end
ReplicatedStorage.LocalScriptPlayerData:FireClient(Player, Profile.Data.cash, Profile.Data.Copper, Profile.Data.MineUpgradeLvl, Profile.Data.CopperSmelterUnlocked, Profile.Data.SmelterUpgradeLvl, Profile.Data.CopperIngots)
end```
yes
Yeah but it can get expensive quickly
So I would still use Touched where ever possible
Why not send the client player.data
insted of val = false use oldTable[name] = false
I wouldnt used touched for my hitreg
RemoteFunction requesting the data
it gives me nil
so the client yields until you give them
dude i'm asking why it works like that cuz a guy already told me to put that
oh sorry i must have read wrong
uhm might sound stupid but how would i request the data with a remote function from a server or local script
oldTable[name] = false changes the table itself by replacing the value at that key with false
From the client, :InvokeServer()
actually writes back into oldTable
and what does val exist for then..?
holds a copy
ohh i get it now ty
np
finaly made my script work altough its unethical and will get u PHYICAL PAIN here it is
local TargetPoint = Target.Position
local Humanoid = script.Parent.Humanoid
local RootPart = script.Parent:WaitForChild("HumanoidRootPart")
local Debounce = false
local function MoveCommand()
Humanoid:MoveTo(TargetPoint)
end
MoveCommand()
Humanoid.Touched:Connect(function(hit)
if hit ~= game.Workspace.Baseplate and hit ~= Target then
RootPart.CFrame = RootPart.CFrame * CFrame.Angles(0, math.rad(45), 0)
print("rotated")
task.wait(1)
Humanoid:MoveTo(RootPart.Position + Vector3.new(8,0,0))
print("move a bit")
task.wait(1)
print("Back to main quest")
MoveCommand()
end
end)
thats my own script that i changed ALOT
no it was cuz i made it rotate to 1 direction only
instead of turning 45 degree everytime it was rotated in 1 direction only
didint see that in ur code
I should try to shill ECS to noobs
OOP has so many glazers that prey on noobs
I gotta replicate that
just shill jabby
that convinces half of them
did you get a notification when I said ECS
no comment
whats ecs oop
problem is its not in a module script its supposed to be a server script for profilestore
ecs users when they cant bulk transform:
extracurriculars
escorting c-lvl-blackers side-knack
entity component system
enity componet system
is this suitable for a player to be morphed into?
What more could I add
Lowkey, I would shorten the duration of the first phase
There is screenshake?
It’s quiet a lil tho cuz I’m zoomed out
Although fov is a good idea
Alr
But then the animation wouldn’t work tho cuz I have the animation first two seconds and the arrow spawns next 2 and fires
It’s after u release z
Bringing vfx instantly like that is bad
whats the best way to get into scripting? i know somewhat of the basics
Starting from lowest level of computer science ending with luau scripting language.
CPU, Memory, Hardware inner workings.
v
Assembly
v
C++
v
Luau
Scripting Roadmap The scripting roadmap has three categories, the basics must everyone know to continue with other more difficult categories. Intermediate is someone who maybe does already commissions and is already not really anymore a new programmer. It is also useful to check what you maybe never knew and now found out through the lists ▶...
also isnt lua easiest lang?
ty bro just got to the point insteasd of waffling
🔥
what the heli
Ironically fastest method to learn, if you're starting from the top you will have no idea what you're doing, getting yourself confused every time.
Better to be able to do everything while being sure what you're doing instead of doing some basic stuff only
its jus extra
just learn lua its literally one of the easiest languages use ai and youtube and other open source projects to learn itll take a while to get the hang of it
so we advocating for pasting
How else would you learn?
its taking timeeeeeeeeee patienceeeeeee is needed
luau is a really easy language to learn
(thats how you learn)
Since when is copying learning?
I said use ai, youtube, and other open source projects to learn how the coding language works
By looking at it or what?
Yes
Thats fair
its like reading a book to get info
You gotta understand and internalize it
also just use roblox docs
When did the skids migrate to code discussion 🥀
is _G useful?
No
anyone good at scripting want to help me on a game I'm making, its building/physics based
how come ? security? or just not needed
How would you guys quantify someone's level in scripting? What are some systems that each level of scripter should be comfortable doing in your opinion?
All I know is you’ve gone too far once you start talking about json
slow indexing speeds, no auto complete, prone to race conditions & introduces hard to find bugs
who here knows OOP looking for comm work dm me
Basically yeah but community hates it because there's no reason to use it because there's better alternatives.
Basically if you wanna use _G for something then there's a better way without using _G
whats a better way
Is someone able to help make a PA system? Like you have a microphone and it projects your VC voice from the microphone into the speaker and makes your voice louder and stuff.
Also yeah _G is slower for some reason, better alternative will be using ModuleScript for whatever you're doing.
Learn every class in documentation that has "Audio" in it's name.
?
Those instances let you do stuff that you want.
Learn them.
Those are instances you can create in your place, like AudioDeviceInput.
Ooh.
This documentation explains them in detail
But how do I like wire them together?
https://devforum.roblox.com/t/new-audio-api-beta-elevate-sound-and-voice-in-your-experiences/2848873
[Update] February 28, 2024 Hello Creators! We’re excited to unveil the beta release of our new Audio API, which includes highly anticipated controls over sound and voice that @Doctor_Sonar previewed at RDC! Have you ever wanted to emit a single sound from various 3D locations simultaneously? What about altering players’ voices? H...
Are there scripts needed?
Why ask me just check out the stuff I gave you.
I dunno, probably? Games usually always have scripting involved, so whatever you wanna make defo will need scripting
use desktop app
Doesn't work on there
I did, but it only just shows what each thing does.
Well yeah?
pfp checks out 😭
Scripts can change properties of those instances or add/remove them, you can do the same manually.
I know there are scripts needed.
I guess you can decide yourself if you need scripting or not.
curious if anyone would be interested in joining a team of devs we currently have a 3D Modeler, Animator, Map Builder, UI Designer and SFX we mainly just need a Scripter on the team
what type of game is it
it’s like this JoJo stand game
we have a pretty good thing set up for it
what's jojo stand
no
hmmm how do I say this
like these powerful spirits that awaken inside of people from an arrow
basis of the game is you use an arrow
you get a spirit
Pretty good description
don’t like it the you use a Roka which removes the spirit
then rinse and repeat
it’s a fighting game too
that’s the basics of the game
then there’s stuff like if the spirit can awaken to a higher level you can do a quest that allows you to reach a higher tier
I think I summed it up pretty well
what the yap
yo goys
since code help is not code help anymore, and certainly this channel isnt either
yes
It was yesterday idk what happened
What is the largest commission you have ever got
No advertising in chat
is it recommended to use a pathfinding module?
I've heard roblox's default pathfinding is trash
It's not trash, it's just general purpose, so there's some trade-offs. Eg if you have just a simple node setup for pathfinding, a custom A* impl will be much faster
Also the key to good pathfinding perf is floodfilling ahead of time to find designated areas that are isolated from each other, so you don't try to run the algorithm to the ground in impossible searches
lol
whatd you do for the green 👀
simplepath is pretty good
-- [[ FUNCTIONS ]] --
local function createIK (name, chainRoot, target, endEffector)
local IKControl = Instance.new("IKControl"); IKControl.Parent = humanoid
IKControl.Name = name
IKControl.Type = Enum.IKControlType.Transform
IKControl.ChainRoot = chainRoot
IKControl.Target = target
IKControl.EndEffector = endEffector
return IKControl
end
local function locateTargetPosition (origin)
local raycastParams = RaycastParams.new()
raycastParams.FilterDescendantsInstances = {character}
raycastParams.FilterType = Enum.RaycastFilterType.Exclude
local result = workspace:Raycast(origin.Position + Vector3.new(0,2,0), Vector3.new(0,-3,0), raycastParams)
if result then
return result.Position
end
end
local leftTarget = createTarget("LeftFootTarget", leftFoot.Position)
local rightTarget = createTarget("RightFootTarget", rightFoot.Position)
local leftFootIK = createIK("LeftFootIK", leftUpperLeg, leftTarget, leftFoot);
local rightFootIK = createIK("RightFootIK", rightUpperLeg, rightTarget, rightFoot)
local leftLastHit = nil
local rightLastHit = nil
local UPDATE_THRESHOLD = 0.1 -- studs
runService.Stepped:Connect(function()
local leftTargetPosition = locateTargetPosition(leftUpperLeg)
local rightTargetPosition = locateTargetPosition(rightUpperLeg)
if leftTargetPosition then
leftFootIK.Enabled = true
leftTarget.Position = leftTarget.Position:Lerp(leftTargetPosition, 0.5)
leftFootIK.Enabled = true
else
leftFootIK.Enabled = false
end
if rightTargetPosition then
rightTarget.Position = rightTarget.Position:Lerp(rightTargetPosition, 0.5)
rightFootIK.Enabled = true
else
rightFootIK.Enabled = false
end
end)
how am i supposed to avoid this rapid jittering from the foot
working on a fake roblox player npc powered by statemachines
Make em wander too
I am
Add randomness
I'm working on the wander and socialize state
Maybe the surface was too close to the hip that's why some constraints don't compliment each other anymore and it starts jittering
yeah there's randomness lul
sometimes it stops, it can stand around a bit and look around, etc
Not enough with that robotic movement
lmfao
2 Variants of Astral.
Octree
I dont know, it seems pretty bad at its job ib my case
Unable to find obvious paths, going around something entirely outside of the correct path
is it good practice to put a localscript in the starterplayer to manage gui's in startergui?
yes
no it depends
i never put scripts in startergui its bad practice
justput a localscript in starterplayerscripts that handles a frame or hud component
Why would you put it in starterplayer for UI that has resetonspawn
i never have resetonspawn enabled on my screen guis
So? It's still bad practice to do it every time
wdym?
the scripts are just gonna load once
in starterplayerscripts
Yes.. and if the UI has resetonspawn?
nobody has resetonspawn enabled
i have never enabled that shit
Stop avoiding that you're wrong LMAOO
It's used a bunch
why should i put scripts in startergui when i have resetonspawn disabled
its just preference
I can't deal with ragebaiters rn
im not even ragebaiting its preference at the end of the day
i personally dont like localscripts scattered around in startergui
Bro I said it's not always best practice if there's reset on spawn, you'd be stupid to put the script in playerscripts for resetonspawn ui
yes true but nobody ever has resetonspawn enabled anyway
Yes they do
okay give me a scenario where it would need to be enabled
A screen where you choose where to spawn eg in a map
why would u need resetonspawn enabled 💀
Because you choose where to spawn each time you die???
u can just detect when you die and make it visible urself
what if u wanted it to have a transition to open
u cant just use resetonspawn
Yes you can?
theres no point tho
How are you even gonna check when they respawn on player?
uhhhh you can use Humanoid.Died or CharacterRemoving
Character removing doesn't work on client
And even if it did there still no point of detecting on removing and on spawn instead of just writing it in character scripts😭
yes it does 💀
if its in starterplayerscripts
My last comment still applies lmao now stop ragebating bro Icba with you
good be confused
dead chat
What is that in the top left
Good 😊
how can we find the actual product id of a gampass?
go to the gamepass dashboard
click 3 dots
and theres a copy id button
Is it possible to scrape my account transaction logs alongside transcation logs from multiple of my groups to make a website dashboard of how much robux is being generated across everything
theres probably an api to get transaction logs
is there a site where i can view all the api's?
because ive done some research and im not finding anything related to this
just open inspect go to network then load your transaction logs
and there should be a request
to an api
Here are all of Roblox’s APIs! Hope this helps. API Endpoints Description abtesting.roblox.com/docs Endpoints for the A/B Testing framework accountinformation.roblox.com/docs All endpoints for accessing/modifying account information accountsettings.roblox.com/docs All endpoints for account/user settings adconfiguration.roblox.co...
could this be of help?
ah so i should be using something similar to that?
yes but u wont be able to view other peoples purchases
and u will ur own api to interact with that api
elaborate on what "other peoples purchases" mean
you can put any user id there, look at the URL
but it won't work
i need to pull payouts from my account & user purchases in the group
thats fine u will need ur roblox cookie
thats all
okay, so what im trying to do is entirely possible?
yeah
ok cool, thank you
that's a security risk tho

