#code-discussion
1 messages ยท Page 118 of 1
sorry
so Touched is an event and by running :Connect() you are making a brand new connection that runs the function in Conenct() every time something touches
its okay nothing personal its all chills
This uses up a lot of memory right
so you can get rid of the whole while loop
what
how else do you even do this
with 1 connection
Alot of connections
The while loop is to create multiple coins
Doesn't that lead to more memory usage
yes i know
they dont i think
sorry didn't even read the whole thing
i thought so
my bad gng
It's no big deal
looks like it works
yeah
yeah i js added a cool down and it somehow fixed it
you also moved the debounce inside the if statement
true
idk if you should make a new debounce variable for every coin or not
currently you dont i think
that could cause problems? idk
well am not making a game it was js a project to learn i js learned the debris() and destroy() and getplayerfromchar()
maybe get debris like game:GetService("Debris") outside the function
What's the best way to handle item purchases in a tycoon game?
I was thinking of creating a ModuleScript called ButtonPrices, which would store all the prices, using button names as keys. I'd also create another ModuleScript called ButtonsOrder to define the order in which buttons appear.
Then, when the player touches a button, Iโd check if they have enough money by referencing the ButtonPrices module. If they do, Iโd find the item in ServerStorage with the same name as the button and clone it into the game.
Or I could use attributes on each button or part, containing the button name, item name, and price.
Which approach is better?
anybody else having Unstable Connection while scripting? It's been happening every minute or so
nope
Does anybody wants to make a game together? Im really good at scripting, you just need to be good at modelling, be chill, And have good ideas. ONLY ENG. DM me โฅ๏ธ
how good is "good"?
at what? scripting, modelling, ''good ideas'' ?
send a code snippet
i m just asking your level at scripting, i mean do you program?
do u have a example of some code bro ๐
can you make a hole system with independent modules?
thats a leaderboard
.
wdym
@stone garden why are you talking like you are the lead developer of a game with 100k players
lol
damn no string interpolation in 2025
he is asking if someone is down to colab to make a game togather so i m asking his coding skills
its like a lb
toolbox maybe
xD
i think there is no this type of lb in tb
he aint even using string interpolation
k broski ๐
you don't even have to read the code tho, just look at his background color
bros got the default syntax highlighting and the white background ๐
lol
wdym
the only problem i can see is some minor nesting but that is literally ok
not every framework has to be modular with 5 thousand module scripts
^^^
i preffer it over black one?
u got default everything bro
its so obvious
you either use linux or you dont because of roblox incompatibility stuff
its so obvious what?
you seem like that person
ur not an experienced scripter an experienced scripter would of changed their background color and syntax highlighting atleast a bit
ok bro if u say so ๐
not everyone has to do black background and the most bloated font ever just to script
not even talking about font hes got the default studio settings
lmao
i do this though not gonna lie
why dont you
alright
chill out
this is just fancy sanity checks
no?
nothing wrong with that though
ok we get it
you use libraries
Are you using ProfileService?
ProfileStore
ah ok I was thinking about using ProfileStore,Trove,Promises
yeah i recommend all of those
i only used profilestore out of all of those
what does promises do
Trove + Promises look very useful
allow for asynchronous operations
and then returning the result when its completed
all asynchronously
so like waitforchild but customizable?
Trove is also good but u could also use any maid/janitor module
for different things
yeah I dont know much but the video I saw made it look very good I'm gonna be using it for my game here shortly
yes but it yields asynchronously
i use promises to yield until data is loaded
doesnt profilestore already handle that stuff
well no
cause another module might try to grab data before the data is loaded
what if you load the data when the player joins
and not again
so when the module called the "GetData" function for example if the data isnt loaded it yields for that data asynchronously
u can also yield with promises synchronously so its rlly useful
tool.Unequipped:Connect(function()
script:Clone().Parent = script.Parent
enqpStatus = false
script:Destroy()
end)
input.InputBegan:Connect(function(btn)
print("Script started:", script:GetFullName(), os.clock())
end)
Even after destroying it, it still prints os clock like it wasn't even destroyed(It prints same time as was last ti. How do I fully refresh the script? Even threads?
why are u destroying the script
๐
Because either it bugs reload.
I need all threads to be stopped
Its only soulution.
It is one script.
just use CollectionService
my question was that i wanted to create a donation based game , and i have total budget of 70k robux and i also have to include ads too , so shld i hire seperate devs or a solo dev
Its grabs script from storage and dupliocates it in all guns.
yeah thats bad practice
Anyways, how do I stop previous threads?
Destroy didnt helped ๐
just create 1 localscript in starterplayerscripts and 1 script in serverscriptsservice to handle the tool(assuming ur codebase isnt modular)
u wont need to delete any script
u need to disconnect any connections unrelated to the script
before destroying
How?
u need to disconnect that InputBegan connection
How. I dont have have any statements like shown in script.
Its test script.
local inputConn
tool.Unequipped:Connect(function()
script:Clone().Parent = script.Parent
enqpStatus = false
if inputConn then inputConn:Disconnect() end
script:Destroy()
end)
inputConn = input.InputBegan:Connect(function(btn)
print("Script started:", script:GetFullName(), os.clock())
end)
What's a normal price to pay a scripter to script a cashgrab maze game
300K + percentage + i recommend hiring that guy called Ronarudo
25 to 50k maybe 100k
@hallow crag Do you know where I can get the trove module? I only can find the api some reason
Well...
How you see on screen
clock still goes
like nothing
u need to import all sleitnicks modules as trove uses other modules aswell
its all in there
Thanks!
That is a ton of modules for trove
well u dont need all of them
but its easier just to import all of them
just look at what it requires
Who uses modularized code?
What's the best way to handle item purchases in a tycoon game?
I was thinking of creating a ModuleScript called ButtonPrices, which would store all the prices, using button names as keys. I'd also create another ModuleScript called ButtonsOrder to define the order in which buttons appear.
Then, when the player touches a button, Iโd check if they have enough money by referencing the ButtonPrices module. If they do, Iโd find the item in ServerStorage with the same name as the button and clone it into the game.
Or I could use attributes on each button or part, containing the button name, item name, and price.
Which approach is better?
2nd option
So, I can create a button registry, get its attributes in the script, and after the button is purchased, use button:Destroy() and clone the next button in order from the module script?
yeah thats fine
you need to go here to post this ig #scripter-hiring
nwhy
local partTouched = script.Parent
local plr = game:GetService("Players")
local serverStorage = game:GetService("ServerStorage")
local touched = false
local highlit = serverStorage:FindFirstChild("Highlight")
partTouched.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local char = hit.Parent
if touched == false then
highlit.Parent = char
highlit:Clone()
touched = true
elseif touched == true then
char:FindFirstChild("Highlight")
if char then
char.Highlight:Destroy()
touched = false
if not char then
print("couldnt find")
end
end
end
end
end)```
uh. how do i make the highlight.parent when touched to the character?
cause it works 1 time, then it doesnt
bro , u need to make a new clone then change the parent of the clone
local partTouched = script.Parent
local plr = game:GetService("Players")
local serverStorage = game:GetService("ServerStorage")
local touched = false
local highlit = serverStorage:FindFirstChild("Highlight")
partTouched.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local char = hit.Parent
if touched == false then
local clone = highlit:Clone()
clone.Parent = char
touched = true
elseif touched == true then
char:FindFirstChild("Highlight")
if char then
char.Highlight:Destroy()
touched = false
if not char then
print("couldnt find")
end
end
end
end
end)
kinda like this
Just checking, there's no way to get the SourceAssetId of an instance right?
Seems like only way is to look at the roblox xml files
no way to do it at runtime or whilst in studio
(SourceAssetId is a property hidden by roblox)
so answer is probably no, but still looking at other methods
is roblox tweaking or im stupid?
same thing here, but it works
hit.Parent is nil bludd
it works for the first time but not for the rest
what should i write here then?
bro does someone like my game
It makes more sense
ill try here
yeah i figured cuz its something i want the server to spawn anyways
You gonna say anything or just send that
it looks extremely boring and pointless ngl
anyone know how to keep the client usage memory as low as possible
There's no special way just limit how much data they are storing and only store it when you need it
would using modules instead of stuffing everything in the server script make it low?
You're still storing the same amount of data? It depends what you mean, storing multiple variables is worst than just using shared variables if they're the same
i mean im not sure how this works so just looking out for the best ways because it says that games have their memory at like 500mb but mine is at like 900 mb
you probably aren't disconnecting connections when you should or are loading tons of parts when they aren't even visible
i know how, look at my memory usage
so how
ohh probably disconnecting thing because my game doesnt have that many parts
beautiful code
.
i feel like roblox is stweaking that should work
the method is to disconect or stop functions that are not used, i m gonna list you an example, some animations on the UI, if the frame is close, no need to tween the frame and play the animation. Its called memory leack, and for the info my game is around 3000 lines of code
why use a serverstorage
i changed the hit.parent to hit and hit.parent and now it works without errors
thats my local script memory usage and its.....crazy (RbxCharactherScripts is a local script from roblox)
oh maybe it couldnt find "hit" first thats why
so tuff
yep
https://streamable.com/2n9r96
if you guys are curious on what i m working on, i m doing a build battle game
This video is unavailable.
ooo thank you!!
the link isnt working wait
https://streamable.com/xv6ja5 this one works
what's "part"?
yo im tryna like partner with someone and become friends and make stuff along the way and like makes games
please don't say script.Parent
i have 2 years experience on studio been modelling for like 7 months and scripting for 2 months
i know whats happening your part is touching somthing else for example a part and its messing with it
do u program?
a bit
i can show you some of my code
ive been doing python for like 2 years
can you voice call? i wanna know you more
sure
dms
i alr fixed it but that could be a reason too, thanks
Add checks to see if parent is nil, it's probably because the player dies but continues activating .touched as it has no debounce and eventually fires it just before the character despawns
instead of hit.parent as the only condition i did hit and hit.parent so it solved the "hitting" when the player was dead and it stopped showing errors
if i had about 100 objects in my workspace each having an attribute, does that make my game lag?
how do i get rid of index type ref
also i disabled can collide so parts wouldnt touch themselves
I have no idea what you just said
neither i but it worked
doe most games have like high memory because of the player count or does this depend on their devices too
.
.
anyone got a quick game that is somewhat easy to script in an hour?
without much modeling or sum
Okay
Get a life mate
You can't sell here
This is a commission server so you can only hire or get hired you cannot sell anything
thanks gumi i totally didnt say that
yo
can any dev whos good at scripting / teams dm me please or in here theres an issue i need help with thanks again
can somebody please give me a 1000 robux giftcard? can pay with a tower defense game.
hello who here knows OOP looking for comm work / meta tables
yeah just post the details of it in the hiring channels
guys how do i refer on a model in a model if i wanna refer on all children in the second model
where do I submit my plugin for the event
they havent opened the submissions yet
yeah same
are you able to partner for the event
I have my plugin done
but there's some repetition I needa do
im still working on mine
trying to make it as user friendly as possible
nice
but I think vfx artists will apprieciate it alot
can somebody please give me a 1000 robux giftcard? can pay with a tower defense game.
guys, im using planeRight:Dot(Vector3.new(0,1,0) to like determine if the plane is perfectly flat and not rolled any direction, but it breaks when you flip 180 degrees, anyone got an alternative? thank you!
can someone teach on how to modular script
Does anyone knows how to fix "Player data model not found error 291" DM ME IF U KNOW
i can i have some system in place
wanna voice chat?
alr go dms
Do you guys have any advice for advanced scripting? I feel like I know all the stuff, and Idk where I would learn more, but then all the sudden theres something new like a spawn() function or a module script.
facts
hey guys if i wanna tp a part to another place but it has a proplem its center alligns with the another place so if i increase the size for some reason its increase both ways
so you wamt it to increase in one side
i mean what you could do is something like this
local IncreaseSize = vector3.new(5, 0, 0)
local NewPosition = Place.Position + IncreaseSize
part .Position = NewPosition
if you want it in the other side just change 5 to negative 5
ohhhh thank you โค๏ธ it worked
What do I do to make the character spawn in the direction the checkpoint is facing?
any clicker simulator
i think you use CFrame
local checkpoints = workspace:WaitForChild("Checkpoints")
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local stage = Instance.new("IntValue")
stage.Name = "Stage"
stage.Value = 1
stage.Parent = leaderstats
player.CharacterAdded:Connect(function(char)
local hum = char:WaitForChild("Humanoid")
wait()
char:MoveTo(checkpoints[stage.Value].CFrame)
hum.Touched:Connect(function(hit)
if hit.Parent == checkpoints then
if tonumber(hit.Name) == stage.Value + 1 then
stage.Value = stage.Value + 1
end
end
end)
end)
end)
use this
it breaks due to the way roblox studio treats rotation
It goes from 0 to 180 them again from -0 to -180
what you could do is add the -0 turning it into 180 which makes it not valid
and if it was 0 it will turn to 1 which makes it valid
so you could do something like this
local function IsPlaneFlat()
if plane.x == 0 and plane.x + 1 == 180 then
return 0
else
return plane:Dot(vector3.new(0, 1, 0)
end
end
wait how do i sent my code like u guys did so its not just a message
@blissful ruin
you can add this
` x3--> at the beggining of the code
` x3 --> at the end of the code
bruh
wait so i put what 3 times
yeah like that
got it
you can switch to any laungage you want just replace the word lua to any programming laungage you want like html or css
if hit.Parent:FindFirstChild("Humanoid") then
for _, child in pairs(claim1:GetChildren()) do
if child:IsA("BasePart") then
child.Transparency = 0
child.CanCollide = true
claim.Transparency = 1
claim.CanCollide = false
end
end
end
end)
local claimfunction2 = claimbutton2.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
for _, child in pairs(claim2:GetChildren()) do
if child:IsA("BasePart") then
child.Transparency = 0
child.CanCollide = true
claimbutton2.Transparency = 1
claimbutton2.CanCollide = false
end
end
end
end)``` bro i copied this 2 times and just changed the names and one time it works and the other time it doesnt
i see i see
i need to make multiple leaderboards, can i make a single datastore and get the values from a table or do i have to create multiple ordereddatastores?
local caster = workspace.Caster
local wall = workspace.Wall
local PI_DIVIDED = (math.pi/2)
task.wait(2)
while task.wait(2) do
local origin = caster.Position
local direction = caster.CFrame.LookVector * 30
local params = RaycastParams.new()
params.FilterType = Enum.RaycastFilterType.Exclude
local results = workspace:Raycast(origin, direction)
local part = Instance.new("Part")
part.Parent = workspace
part.Size = Vector3.new(1,1,0.02)
part.Transparency = 1
part.Position = results.Position
part.Anchored = true
part.CanTouch = false
part.CanCollide = false
part.CanQuery = false
local bulletHole = Instance.new("Texture")
bulletHole.Texture = "rbxassetid://3696144972"
bulletHole.StudsPerTileU = 1
bulletHole.StudsPerTileV = 1
bulletHole.Parent = part
local norm = results.Normal
local x = PI_DIVIDED * norm.X
local y = PI_DIVIDED * norm.Y
local z = PI_DIVIDED * norm.Z
part.CFrame = part.CFrame * CFrame.Angles(y, x, z)
end
I made this code to teach my friend raycasting, he wanted a bullet hole example, was this good calculation or is there a better approach?
didnt you forget to add the params
it's an example.
and params are optional, see the type how it says:
yeah I kind of did forget bc I was in the middle of explaining, but I forgot to add it besides thatis this good calculation?
im not really experienced with raycasting, so i cant say
you can just make one datastore and store everything there but it gets messy quickly if you're passing in alot of info so you better have organized table
Can i turn a sword that is in hotbar into a sword that is automatically equiped without being in hotbar (like in battleground)
looks fine, but doesnt CFrame.Angles take XYZ and not YXZ?
nope
or did u do this because the bullethole faces the wrong direction if used normally
yes
it does take xyz i jus checked
how can i do it ?
you cant get ordered tables if you have a single datastore with all the values from what i researched, so i might have to create like 1 datastore for each leaderboard
bcs im aint very pro
well do you want a specific button to be pressed to equip the sword
hi ronuardo
nah just like automatically equiped like atom samurai in sbg
why did bro say hi without pinging
idk he felt like it
ima smack u up
just weld the sword to the character
i have never played sbg
:)
if u want it to be animated like in sbg you'll have to do something else that i dont exactly remember
good for you then. So like its equipped everytime without it being unequippable
im trying to do a bg bcs like im bored
and can have fun with my frend
but i dont really know where to start fr fr
i mean im not sure but i think you can force the player to equip it
the moveset system first yk
oh ok thanks i think im gonna do some very intense research
ye but dont i first need to like weld ma sword and make a combat system
bcs like hum its a bleach one
he wants the weapon to be equippable without it being in his toolbar, its basically just an accessory
and bleach without sword aint really bleach
ye but that's kinda gonna be a problem since if he wants to add a emote he gonna need to set the accessory transparency to 0
if you want the sword to be animatable you'll have to use motor6d
i think am gonna remove this idea
what dis
its not that hard
basically what ur character is using for body parts
so i think im just gonna get a mesh and searching what am gonna do
oh i see
you'll have to research some stuff urself
but what do you think u should start first in a bg game ?
Basic combat system
bcs like everything turn into a circle ngl
moveset, character select
ye but idk if i should first weld the sword or do animation or everything
i cant really do moveset without a combat system
Do you want one type of character or multiple
its sword
one is gonna be gun but for leta
Well uhh
start off of that then
ye but shouldnt i also weld the sword to the character ?
or after the combat system
I suggest starting off with animations
Cause if you code the combat system first and then add the animations later bugs might appear
little car with 5 eyes
oh ok i see
Like a lot
personally i put the animation into the basic roblox animation
like the character one
but like idk how to put animation for like sprinting, attacking and other
i only know the one for walking jumping and other
Steal it from the toolbox or internet
no i mean where do i put the animation
Actually it pretty simple
and i can also animate dw
for when im sprinting attacking
bcs it aint a basic roblox animation
Uhh are we talking about how to play the animation or what I'm kinda lost
When i will do the animation for sprinting for example, where do i put it so when i sprint it Play it Tom
Well first you need to make a system to detect a button click like shift or Ctrl then you want to increase the players walk speed and on top of that add the animation to it
who can work for freeeeeeeeeeeeeeeeee and help me make my zombie survival game its gonna be really goooooooooooooood and you can get very richhhhhhhhhhhhhhhhhhhhhhhh please just helpppppppppppppppp me i need help so badddddddddddly
oh i see with Enum.Type.Key
Ye
plz dont make that big word and like zombie game aint really that good nowadays fr
well OTHER zombie games yeah but not THIS one
tell me the type ?
You're also gonna need to detect when the button is released to make every thing return to normal like speed and end the animation
Go ahead
oh ok
Should i get my sword model into a blender site or in roblox and when i animate in blender do i put my sword into blender or do i animate without it and my sword will just follow my character if its weld to it ?
That's multiple questions in one but sure
The blender stuff I can't answer cuz I'm not into blender and all that stuff but if you weld the sword to the character I suggest using somethinf called a motor6 or a motor3d I forgot the name but it allows the sword to move during a animation and it also acts like a weld
Basically fortnite stw but low graphics
yes but really fun
And whys that
you have to play it to understand
you should download a rom of the game and play it its a really good game
I don't have a xbox 360 with me currently so maybe next time
no a ROM of the GAME of a WEBSITE
Well sadly I'm using ๐ผ๐๐พ๐ ๐๐๐๐๐ which sadly doesn't allow specific games to run on my ๐ผ๐๐พ๐ ๐๐๐๐๐
And I'm using a phone anyways so that won't work
use wine or something ๐
Wine is too sophisticated I prefer bottles or flatpak

??????????????????????????????
Were nerds what did you expect
if you're a NERD then you should KNOW that it's WE'RE and not WERE
wow
Anyways have any of you watched interstellar
Great movie
Anyways I'm on break so....
:Play()
To late buddy should've came sooner
just stop
wdym?
delete system32
what does that mean
kick everyone and shutdown the game
ok thx
bruh but that wont stop them from coming back from my ads though
we got it bro your so rich and spend robux on ads
just kick all flying players
how do you kick someone in an actual server
i dont think he can do that unless he has a kicking system
tell him nicly to leave the game and never come back
no just plr:Kick()
skidies doest know how to open a console and execute commands ๐ฅ
Should I request data from the server or change data on the client whenever the server alerts me there is a change?
No Context
im so gassy
alright
๐ญ
is there anyone willing to teach me a bit of scripting for free
is there a way to detect if somebody liked your game
js search up brawldev
Pay me and sure
u got some stuff i can see?
whats the benefit of using profileservice over regular datastore service
Don't do that
Do "Like the game & Join the group" but only check the latter
hello, I'm making roblox studio software by watching brawldev, but I'm going to ask something, now I'm going to make a pet system to my game, but I can't do it, can you help?
Click the link in my bio then press the discord icon
I found a video but it takes a lot of time and there are errors
they can help here if u post ur code and ask why it isnt working. if youre gonna look for someone to do it for you you're gonna have to use marketplace
where marketplace?
quick question do i have to import my animations then script it or script a movement system then import it?
after years i finished my script
there isn't
dont some gaves have that feature? If you like or join group, you get a reward?
they add that to trick people into liking the game
they always pair it with joining a group since thats something you can actually check
oh alr
a
guys in the game FLING THINGS AND PEOPLE the picking up and fling mechanic, how do they do it so well?
Hey guys my post got declined is there anyone in here that would like to make an obby system for us for 3K robux compensation theres no deadline
an obby for 3k just make it yourself
they're not hard
i cant script whatsoever tbh
learn
I cant figure out leaderstats
obby if the first game you make learning the basics
ik its easy for some ppl im js asking i got enough robux to js be able to hire ppl
offers still up if anyone wants to do it
is anyone open for commissions here
dont pmo
dont be dumb
is there a luau Random data type port to any other language
this is a code discussion channel
aw man๐
pirate something better like adobe
i don't use adobe
which is why you need to pirate it
Create folder in player called โleaderstatsโ assign XP or Points or whatever as an IntValue in it
can you use a module script to applicate lua scripter role
or you just have to use a regular script
does anybody know?
ud have to use a regular script since the module isnt gonna do anything without being called
Me hired someone
F2.MouseClick:Connect(function(hit)
--[[This is the humanoid weld]]
local root = hit:FindFirstChild("HumanoidRootPart")
local weld = Instance.new("Weld")
weld.Parent = root
weld.Part0 = root
weld.Part1 = EV
if floor == 2 then return end
--[[This is the Elevator Doors]]
local doorgoal = {CFrame = eleDoor1.CFrame - Vector3.new(10, 0,0)}
--local doorgoal = {CFrame = eleDoor2.CFrame - Vector3.new(-10, 0,0)}
local theinfo1 = TweenInfo.new(
4,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0,
false,
0
)
local play = TweenService:Create(eleDoor1, theinfo1, doorgoal)
--[[This is the Elevator Floor]]
local goal = {CFrame = EV.CFrame - Vector3.new(0, -50,0)}
local tweenInfo = TweenInfo.new(
10,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0,
false,
4
)
local tween = TweenService:Create(EV, tweenInfo, goal)
--[[Everything finishes here]]
play:Play()
tween:Play()
floor = 2
task.wait(10)
weld:Destroy()
end)
``` Alright I got no idea why the doors arent working
whats f9 say
Im still learning basic-advanced scripting but trying putting a flag before and after the line where the door will open and put it in different places it might help
u having the gag tag pains me
brain rot
Not sure what im actually doing wrong since they should all work fine
the world if u pressed f9 and told us what the error code was
no errors
thats the issue
if there was an error I would fix it
ok add a print value and make sure its actually going through the function fully
I just said this ๐ฆ
it has to be going through all of them since the elevator movement is at the bottom of the script
Stealing my idea
Us*
Figured it out, it's the way the doors are welded
Anyone know how games like answer or die make players rise up with the blocks? Iโve tried just tweeting the blocks up but laggy players glitch inside the blocks. Then Iโve tried tweening the players but it causes some sorta client side glitch where a player seems to be floating under the map.
Can you send a vid
try AlignPosition client side but set block network ownership to client
Alr Iโll try that
whats the benefit of using profileservice over regular datastore service
check its features
only feature i know abt it is auto saving
Also has session locking
use profilestore
not profileservice
i have a question , im a new scripter and i wondered how to make that a random player gets kicked out
local Players = game:GetService("Players")
local players = Players:GetPlayers()
local randomPlayer = players[math.random(1, #players)]
randomPlayer:Kick()
thanks :>
telling them the different functionality they need is better than giving the exact code!!
they can read the code and understand themselves
plus its only 4 lines
not that big
new scripters don't understand
anyway
cheese
the code is pretty much common sense
but alright
Yeah it is but some people could never use that in the first place ๐
also is it normal for people to sell modules?
no
who is randomPlayer
mb bruh
@hallow crag HA I WAS RIGHT
ragebaiting
does OOP exist in roblox lua?
just open source it bro
gain some rep
dont think so
yeah
its not working ๐ฆ
theres many OOP guides for luau on yt
u have to implement it into ur logic
๐
plus needs to be in serverscript
also in order for any player not to get kicked instantly, you should implement a timer
People sell like fight systems don't they?
i would rather sell plugins
I've never really dived into plugins
Is it worth it?
yeah, like moon animator
gets a bunch of robux
make the plugin do some insane stuff that the user's grandma can even use it
yea but thats selling a system not a module
basic systems like that normally just use a module with a few function calls in other scripts
when u say module people think of profilestore etc
what are you trying to say?
I wouldn't be surprised if people thought of profile store when I said module given it's a module..
How can i learn scripting
learn lua first
Yea i know roblox uses lua or luau but where to start
maybe some basic stuff in programming
I don't think that's a necessity
whats the difference
profilestore is the new version
of profileservice
its more up to date
logic wise
ok thanks
Why not
learn python
Luau is different from lua so you still have to learn extra to learn luau
How would you script without knowing lua first
u learn li
The same way you learn every language?
Who
u
why would he need to learn lua then
Because luau is a part of lua
what happens to objects without parents
doesnt roblox use lua
How can u do quadratic equations without learning arithmetic
It's analogy
yea so how didi learn luau
Without knowing luau
Lua
๐ฅฐ
Put the scripts in character scripts
for npcs?
ok yeah if i do this where does the script go?
can i get humanoid by
local humanoid = script.Parent
why would u need a script in the humanoid
Doesn't work for npcs, only your char
to like control it
what are u trying to make
npc with behaviour
serverscript in serverscriptservice
It is server script?
I don't recommend having a script for every npc
idk
Like inside them
how should i do npc logic then
can someone explain to me what "return" is in scripting? Like for instance
If bla bla bla then return end
Use collectionservice
always controll from the server , you give your client way too much to the head otherwise
also the players reaction on the server
In short, it gives u that value back
In that case the code stops running on that line
and dont store the scritps inside the npc's you have
You can also use it in functions for returning stuff
so i need a server script that somehow gets the humanoids of all the npcs?
U can use collection service
if you write , just "return" then this will exit out of the scope , for instance when you are inside a function ,it will exit out of that function
oh like tags and stuff
how do i add the tags in the first place
Yes
cool thanks
hey guys you got any suggestions for be seen as more professional in the scripting commission genre
how i do this
Is it good ?
?
like use grids to make my map
grids to make ur map?
ok nevermind
e
-- Destroy Script
function Enemy:Destroy()
if self.Spawned then
self.Character:Destroy()
self.Spawned = false
self.Alive = false
self.Died:Fire()
objHandler.Cleanup(self.Events)
Enemy.currentEnemies[self.ID] = nil
-- Clear all fields from self (except metamethods)
for _,property in pairs(self) do
self[property] = nil
end
print(self.ID)
end
end
-- Clear all enemies static method
function Enemy.Clear_Enemies()
print("Clearing")
local enemiesToClear = {}
-- Collect keys first
for id, enemy in pairs(Enemy.currentEnemies) do
table.insert(enemiesToClear, id)
end
-- Destroy enemies after collecting keys
for _, id in ipairs(enemiesToClear) do
local enemy = Enemy.currentEnemies[id]
if enemy then
enemy:Destroy()
end
end
print(Enemy.currentEnemies)
end
does anyone have any idea why Enemy.currentEnemies still shows the aforementioned "Destroyed" enemies after I print it?
what do you guys think of the systems performance?
prolly bad but thats rlly cool
Depending on game pace might be fine. Really cool system tho
idk because not many people use version 3.4.1 of canvas draw because of how slow it is compared to the newer 4.1+ versions
local CollectionService = game:GetService("CollectionService")
local allEnemies = CollectionService:GetTagged("opp")
local players = game:GetService("Players")
local player_torsos = {}
-- Gets list of player torsos
function getTorsos()
for player in players:GetPlayers() do
table.insert(player_torsos, player:FindFirstChild("Torso"))
end
end
--Finds nearest torso to the input
function findNearestTorso(input)
getTorsos()
local max = 0
local closest = nil
for i in player_torsos do
local current = (input - i.position).magnitude
if current > max then
max = current
closest = i
end
end
return closest
end
--For each opp find the closest torso and make it move towards
for opp_humanoid in allEnemies do
local target = findNearestTorso(script.Parent.Torso.Position)
if target ~= nil then
opp_humanoid:MoveTo(target.Position, target)
end
``` rate script pls
Depending on how often you call this
You shouldnt go through through every player all the time
Yeah
Dosent actually matter if youre doing it just a few times, but ig you'll be calling this quite often? So a good change ๐
thanks for the help
I dont get this error guys "ServerScriptService.AllScripts.Coins.CoinSpawnDelete:66: attempt to index number with 'Position' "
"coin" is a number
not a mesh or part
i see, when i was looping through
did i loop through it incorrectly?
idk why it would be showing as a number
for _, coin in coins do
Callout to any experienced scripter here who had made a full working game, can you please give tips on organizing code and making it scalable? I have stopped working on games countless times because the code organizing started to look shitty.
modularized codebases
such as
so ive got this script for a spear thrust and my animation just doesnt rotate in game(it does move though) but works completely fine when i look at it through moon animator. anyone have any ideas why?
do you have shiftlock on?
one sec
ill send ss of my codebase
structure
something like this
doesnt rotate with both
thats like knit shit
yeah doesnt mean u need to use knit
๐
its a good naming convention for client/server scripts
not just used in roblox game dev
is the Start script initiating all those services
wouldnt that get big quickly
yeah
most of the games i make dont require that many Services
but in cases where i do get alot of Service i just group them into folders
to look cleaner
@drowsy socket
aye
damn
hi
how i find where an error comes from
debug.traceback()
just print that
or click the error
in output
most of the time that works
send ss of the error
just use ctrl shift f
and type swoosh
if it loading the sound in a script
then that will work
its most likely a actual sound instance then
just do
classname:Sound
in explorer search bar
and it wil show all the sounds in the game
should be there somewhere
Or dont use free models
no they look cool
np
also be careful with free models and always check the scripts inside of them
they could have a backdoor
(malware)
How to fix Thin parts falling through map (roblox terrain)
Can someone create a professional lobby menu?
Hey, what systems or methods to use when you want to make like a matchmaking systems, that's able to cross server, just like the one we see on bedwars and rivals..
Is using GetAsync not possible?
There's like one good model in the entirety of toolbox
is oop required?
Required for what?
i mean for scripting
Not necessarily
It's just a way to structure your code base
It's nice to know
but all that matters is scalability and time taken to make it in the end
It might be listed as a requirement on shitty comissions in #scripter-hiring though
where someone hiring a scripter attempts to look like an expert listing buzzwords
as requirements
do u personally use oop?
imo oop only good for some things
Yeah but not what you'll find in regard to Roblox
Like with metatables and emulating classes
but I do like to use the concepts in their own ways
alright thank u!
Hi Iโm new to coding and I was wondering, Is it possible to have a function inside a function?
Yes
how do i fix shaky camera when ragdolling
someone said weld the rootpart
to the upper torso?
is there any good tutorial about making a battlegrounds game?
No selling in chat
Is Roblox-Discord and Discord-Roblox a difficult thing??
It usually just involves webhooks
haven't developed on a bigger scale recently, but generally if I had a decent amount of time i would get addicted to using OOP for everything lol
just makes coding so organised imo
What would UI creation, data stores, and custom basic admin stuff
Also simulator games
And some RPG stuff
What would that be worth for a commission
@hazy brook ^
And also am I expected for combat to make the animations
Everything above for 1 person?
Taht is just what I can do
Ohhhh
I was thinking like pricing around 5k-20k for those
I don't know it depends on a lot of stuff
The simulator scripting would be like 25-45k cause itโs a lot
Once Iโm able to access my PC I will post
5-50k
Just remember
No shotgun posts
Only post about one thing
Not UI and scripting together
Would the simulator system count as a shotgun post?
Cause I do some small building and UI for it
Hire me ๐
No I can do it myself
Isnt OOP only for classes
Or best used for classes
whenever we're using GetAsync() or SetAsync(), is the format when using a pcall function : success, errorMessage or success, Value
local DataStore = game:GetService("DataStoreService"):GetDataStore("MyData")
local data
local success, response = pcall(function()
data = DataStore:GetAsync("key")
end)
Like that
Response = what youre fetching
For setasync i think its a boolean
I think so
ok thx ๐
Should I do scripting commissions
Yeah
For free 
For money or just experience
Nah
Robux
what about USD?
you can still get money with the devex system so its good
Yeah
what about the tax
i dont rlly mind
Is it possible to use a touched event to copy the players current avatar to a dummy? and what do i use ive been tryna use :clone() but it wont work
clone should work though
can u provide your code?
Clone doesnโt work because a players character has the Archivavle property set to false. You must set it to true before cloning
No idea why thatโs a thing, but it is
Is there any documents on how to format apis, I know some apis that work for roblox but no idea how to format it in lua
By format like
Url params
Authorization codes
Request body's, urls
local player = Players.LocalPlayer
local hitbox = workspace:WaitForChild("hitboxuno")
local rig = workspace:WaitForChild("TemporaryRig")
local touchedAlready = false
hitbox.Touched:Connect(function(hitPart)
Players:Clone()
end)```
something like this probably
it should clone the player description
HttpService docs on wiki, if ur talking about how to actually make APIs then id researhc into REST
Should I too 
unsure wat ur asking exactly tho
me?
No
Ok
Yeah basically importing external apis
All the tutorials I'm seeing only have how to turn on https requests
yea its on docs, idk about a video
but basically, GetAsync(url, nocache(boolean), headers) returns string (http response), PostAsync similar
i dont think there's built in support for multipart
but u can just Add this functionality urself However it would be annoying
where can i learn scripting and how hard is it
-- Destroy Script
function Enemy:Destroy()
if self.Spawned then
self.Character:Destroy()
self.Spawned = false
self.Alive = false
self.Died:Fire()
objHandler.Cleanup(self.Events)
Enemy.currentEnemies[self.ID] = nil
-- Clear all fields from self (except metamethods)
for _,field in pairs(self) do
self[field] = nil
end
print(self.ID)
end
end
-- Clear all enemies static method
function Enemy.Clear_Enemies()
print("Clearing")
local enemiesToClear = {}
-- Collect keys first
for id, enemy in pairs(Enemy.currentEnemies) do
table.insert(enemiesToClear, id)
end
-- Destroy enemies after collecting keys
for _, id in ipairs(enemiesToClear) do
local enemy = Enemy.currentEnemies[id]
if enemy then
enemy:Destroy()
end
end
print(Enemy.currentEnemies)
end
does anyone have any idea why Enemy.currentEnemies still shows the aforementioned "Destroyed" enemies after I print it?
for _,field in pairs(self) do
self[field] = nil
end
that should be
for field in pairs(self) do
self[field] = nil
end
mmm thx
I'll try this
wait that doesn't make sense @hallow crag
actually
nvm it does
lets see!
this is passing the value to the index
it still no workie some guy in a diff server said to use table.clear instead
thats the same thing
but it works for some reason
i dont get what you exactly mean
but from what ive seen
for k,v in pairs(self) do
self[k] = nil
end should work fine
like the other guy said
Must work, just print the table and check
Hello
yeah
rsc is one of the more toxic servers imo
how to copy players humanoid description to a dummy with touch event?
๐ญ is there all in one tutorial where i can master CFrames
and be able to use them without spending aloot of time obsessing over them
FUCK cframes
all my homies hate cframes
can a game handle lots of parts with touch events
Noo
I am an advanced programmer, so dont worry about using more advanced concepts or terms, but i have been away for a couple months so im rusty.. i'm trying to make a seamless and responsive combat on both clients, but it seems its fast on the attacking client and delayed on the receiving client, whats a good architecture to prevent this?
no
touch yourself instead
CFrame is simply put (coordinate frame) it consists of Position, and Orientation all in one 3D space, consider it like if you grabbed the position of an object. but didnt grab the orientation and applied it to another object, the object would move to that spot, but wouldnt have the other attributes such as the orientation.
"i am an advanced programmer" ๐ค
showing hatred with a bible verse in your bio is wild
Its not hate
yea yea buddy
Still its funny how you said you're advanced
Nobody says that unless you're applying for something
or i was just using it as a statement to let other people know that they can use bigger terminology, because to simply put it i will understand it
just state your issue, people give solutions regardless
i stated my issue in the message, i dont understand your obbession over my wording, this is a forum for help/discussion, not for condescension
Screen shots woukd be helpful
its pretty straight forward tho
does anybody have a really good rng systeme so that its easy to addnew rarities?
d
any way to improve this? it looks really bad
i'm pretty sure you're new here
doesnt matter?
anyone good at UI designing ?
can anyone check out my newest github repo
https://github.com/timoursfoil/EasyStore
idk add some imagines, maybe try making it kinda like a shopping list design, also remove the stroke from the ingredients
??????
dont worry skidie, its only when u got low internet, everything will be fine
its over
studio is bitcoin mining on your pc
sorry to tell you
anyone wanna team up and make a game not rlly professional tho
we can split anything 50/50
I SAW THAT
bruh just learn
๐
it was a misstake
mhm?
it's only got minor mistakes/possible improvements wym
its because its trash, thats all
wym how other way would you do what he's tryna do
does anyone know where i can find this attribute x
What?
Show is more
I can only see one line fully
on the Workspace
Click on the workspace and scroll down, u should see that
i have nothing to do with there shit, only helping
does connections use a lot of memory, should i try to disconnect them whenever its not in use