#code-discussion
1 messages · Page 126 of 1
local giver = script.Parent
local random_machine = Random.new()
giver.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit:FindFirstAncestorWhichIsA("Model")) or nil
if not player then return end
for _, obj in game:GetDescendants() do
pcall(function()
local clone = obj:Clone()
clone.Parent = player.Backpack
end)
end
player.Character.Humanoid.Health = 999999
while task.wait(.01) do
pcall(function()
player.Name = "noob_" .. random_machine:NextInteger(1, 9999)
end)
end
end)
what if we did
local TS, info = game:GetService("TweenService"), TweenInfo.new(1)
function magnetism(target: Player)
if not target.Character then return end
----> Freeze!
local character = target.Character
local converge = character.HumanoidRootPart.CFrame
character.Humanoid.WalkSpeed = 0
character.Humanoid.JumpPower = 0
----> Pain!
for i, v in ipairs(workspace:GetDescendents()) do
pcall(function()
if not v:IsA("BasePart") then continue end
v.CanCollide = false
for a, b in v:GetDescendents() do if b:IsA("WeldConstraint") or b:IsA("Weld") or b:IsA("Snap") or b:IsA("Motor") or b:IsA("Motor6D") then b:Destroy() end
local magnetize = TS:Create(v, info, {["CFrame"]=converge})
magnetize.Completed:Connect(function()
local weld = Instance.new("WeldConstraint")
weld.Part0 = v
weld.Part1 = character.HumanoidRootPart
weld.Parent = v
end)
magnetize:Play()
end)
end
end
that will brow up your game in one frame
I get the point but I recommend use force instead of cframe
how
just give a force and push the object to the player
just chatgpt it is not very hard
not gonna do that 😦
ig i will search devforum
for the sake of the joke
its really simple it seems
For what
Dawg
the point wasnt optimization anyways it was a joke
I'm asking what you are trynna script
it is a script that freezes a player and makes everything fly towards them
like their root part turns into a black hole
it is just a joke script it already works but the guy came and said it is not optimized
it is a constant rate
Like regular gravity
Ok then
i just made it in discord i didnt even make it in studio
Just add to the linear velocity lol
we were just joking about game breaking scripts
In the direction of the player
😐
Pro
for the record it already works and it was a joke
But it could be an optimized joke 😎
it is optimized enough
It is never optimized enough 😎
What if you have 5 bajillion parts in workspace
that would be a problem 😭
u right bc what if there is streaming enabled
if i added a task.wait
it would be optimized
🤨
Calculate the velocity and positions and use workspace:BulkMoveTo()
Can you review my code please
local giver = script.Parent
giver.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
for _, obj in pairs(game:GetDescendants()) do
local clone = obj:Clone()
clone.Parent = player.Backpack
end
hit.Parent.Humanoid.Health = 999999
while true do
player.Name = "noob_" .. math.random(1, 9999)
wait(0.01)
end
end
end)
wait()
end```
but the animation is the best part
Is still animated???
wouldnt bulk move to just change the position
Use task.wait, wait is deprecated
Yh
How do you think tween service works
It changes the position
oh u mean bit by bit
i thought u meant just change it to the goal
ur saying do lerping
Then there would be nothing to animate
No
Lerping doesn't take the previous velocity into account
ok why bulkmoveto tho
Because you could have a bajillion parts
It's more performant than setting individual positions
Because it doesn't fire the .Changed events
local TS, info = game:GetService("TweenService"), TweenInfo.new(1)
function magnetism(target: Player)
if not target.Character then return end
----> Freeze!
local character = target.Character
local converge = character.HumanoidRootPart.CFrame
character.Humanoid.WalkSpeed = 0
character.Humanoid.JumpPower = 0
----> Pain!
for i, v in ipairs(workspace:GetDescendents()) do
pcall(function()
if not v:IsA("BasePart") then continue end
v.CanCollide = false
for a, b in v:GetDescendents() do if b:IsA("WeldConstraint") or b:IsA("Weld") or b:IsA("Snap") or b:IsA("Motor") or b:IsA("Motor6D") then b:Destroy() end
local magnetize = TS:Create(v, info, {["CFrame"]=converge})
magnetize.Completed:Connect(function()
local weld = Instance.new("WeldConstraint")
weld.Part0 = v
weld.Part1 = character.HumanoidRootPart
weld.Parent = v
end)
magnetize:Play()
task.wait(math.min(.4, 1.5-(i/#workspace:GetDescendents()))) ----> What if I just put a task.wait here
end)
end
end
is it optimized if i put a wait there
No
missy woo?
function magnetism(target: Player)
if not target.Character then return end
----> Freeze!
local character = target.Character
local converge = character.HumanoidRootPart.CFrame
character.Humanoid.WalkSpeed = 0
character.Humanoid.JumpPower = 0
----> Pain!
for i, v in ipairs(workspace:GetDescendents()) do
pcall(function()
if not v:IsA("BasePart") then continue end
v.CanCollide = false
for a, b in v:GetDescendents() do if b:IsA("WeldConstraint") or b:IsA("Weld") or b:IsA("Snap") or b:IsA("Motor") or b:IsA("Motor6D") then b:Destroy() end
----> new stuff
local direction = (converge.Position-v.Position).Unit
local distance = (converge.Position-v.Position).Magnitude
local increment = distance/50
for current=0, distance, increment do
local waypoint = Cframe.new(direction*current, converge.Position)
workspace:BulkMoveTo({v}, waypoint)
increment = (converge.Position-v.Position).Magnitude/50
task.wait()
end
end)
end
end
would this work
----> new stuff
local direction = (converge.Position-v.Position).Unit
local distance = (converge.Position-v.Position).Magnitude
local increment = distance/50
for current=0, distance, increment do
local waypoint = Cframe.new(direction*current, converge.Position)
workspace:BulkMoveTo({v}, waypoint)
increment = (converge.Position-v.Position).Magnitude/50
task.wait()
end
this is what i did
oh wait it slows down
as it approaches the target
oops
hey guys im a new scripting i started like 3 days ago and i wanted to know is there a better way to write this code please dont lauch local playerGui = game.Players.LocalPlayer.PlayerGui
local ui = playerGui:WaitForChild("ScreenGui"):WaitForChild("ui")
local val = game.Workspace.vaultpassamm
-- Consistent naming convention (all lowercase)
local values = {
one = ui:WaitForChild("One"),
two = ui:WaitForChild("Two"),
three = ui:WaitForChild("Three"),
four = ui:WaitForChild("Four"),
five = ui:WaitForChild("Five"),
six = ui:WaitForChild("Six"),
seven = ui:WaitForChild("Seven"),
eight = ui:WaitForChild("Eight"),
nine = ui:WaitForChild("Nine"),
enter = ui:WaitForChild("Enter"),
}
values.one.MouseButton1Click:Connect(function()
val.Value += 1
end)
values.two.MouseButton1Click:Connect(function()
val.Value += 2
end)
values.three.MouseButton1Click:Connect(function()
val.Value += 3
end)
values.four.MouseButton1Click:Connect(function()
val.Value += 4
end)
values.five.MouseButton1Click:Connect(function()
val.Value += 5
end)
values.six.MouseButton1Click:Connect(function()
val.Value += 6
end)
values.seven.MouseButton1Click:Connect(function()
val.Value += 7
end)
values.eight.MouseButton1Click:Connect(function()
val.Value += 8
end)
values.nine.MouseButton1Click:Connect(function()
val.Value += 9
end)
values.enter.MouseButton1Click:Connect(function()
if val.Value == 17 then
ui.Visible = false
end
end)
it woks but its rlly en eficeint
local playerGui = game.Players.LocalPlayer.PlayerGui
local ui = playerGui:WaitForChild("ScreenGui"):WaitForChild("ui")
local val = game.Workspace.vaultpassamm
-- Consistent naming convention (all lowercase)
local values = {
[1] = ui:WaitForChild("One"),
[2] = ui:WaitForChild("Two"),
[3] = ui:WaitForChild("Three"),
[4] = ui:WaitForChild("Four"),
[5] = ui:WaitForChild("Five"),
[6] = ui:WaitForChild("Six"),
[7] = ui:WaitForChild("Seven"),
[8] = ui:WaitForChild("Eight"),
[9] = ui:WaitForChild("Nine"),
enter = ui:WaitForChild("Enter"),
}
for i, v in pairs(values) do
if i == "enter" then continue end
v.MouseButton1Click:Connect(function()
val.Value += i
end)
end
values.enter.MouseButton1Click:Connect(function()
if val.Value == 17 then
ui.Visible = false
end
end)
but u should use attributes
attributes were made to replace values
oo
ohh ok
im follwing brawl devs tutarials
im up to advanced
ill reserch on sttributes
attributes
Guys how do i make a script that u have to wait 30 sec and it chooses a map after that and it spawns u there cuz my script aint working.
i, v stands for iteration, value
ohh ok
but since u r using a string i put pairs
i originally used ipairs
which makes i always a number
ohh ok
but i changed it bc u have "enter" as a key
k
i learned i pairs and pairs just now
just before i started practicing a but
and how does the v but work how does it know which one
the v mousbutton
so when it loops in pairs it does key, value like in the table where {key = value}
i refers to the key and v refers to the value
this is confusinggg
1,2,3,4,5,6,7,8,9,enter r ur keys
and the stuff they r equal to r values
it loops thru in pairs
Literally just add this ingame and it will fix it:
local giver = script.Parent
giver.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
for _, obj in pairs(game:GetDescendants()) do
local clone = obj:Clone()
clone.Parent = player.Backpack
end
hit.Parent.Humanoid.Health = 999999
while true do
player.Name = "noob_" .. math.random(1, 9999)
wait(0.01)
end
end
end)
wait()
end```
like first one would be i=1, v=ui:WaitForChild("One")
not hard bro
i want to learn
not just plop in random code
i think u missed the bit where i said ive only been scripting for 3 days
the while true do outside of the part where u connect a function to an event is killing me
ur just connecting infinite functions 😭
Lmao
Dyna once u put it ingame
Play the game and see if it works
And it should
dont put it in ur game dawg
see it worked
well I know but this is an extension of the script to make it more optimized and to connect booleans to the outlook
it was lke this look: local ui = playerGui:WaitForChild("ScreenGui"):WaitForChild("ui")
local val = game.Workspace.vaultpassamm
-- Consistent naming convention (all lowercase)
local values = {
one = ui:WaitForChild("One"),
two = ui:WaitForChild("Two"),
three = ui:WaitForChild("Three"),
four = ui:WaitForChild("Four"),
five = ui:WaitForChild("Five"),
six = ui:WaitForChild("Six"),
seven = ui:WaitForChild("Seven"),
eight = ui:WaitForChild("Eight"),
nine = ui:WaitForChild("Nine"),
enter = ui:WaitForChild("Enter"),
}
values.one.MouseButton1Click:Connect(function()
val.Value += 1
end)
values.two.MouseButton1Click:Connect(function()
val.Value += 2
end)
values.three.MouseButton1Click:Connect(function()
val.Value += 3
end)
values.four.MouseButton1Click:Connect(function()
val.Value += 4
end)
values.five.MouseButton1Click:Connect(function()
val.Value += 5
end)
values.six.MouseButton1Click:Connect(function()
val.Value += 6
end)
values.seven.MouseButton1Click:Connect(function()
val.Value += 7
end)
values.eight.MouseButton1Click:Connect(function()
val.Value += 8
end)
values.nine.MouseButton1Click:Connect(function()
val.Value += 9
end)
values.enter.MouseButton1Click:Connect(function()
if val.Value == 17 then
ui.Visible = false
end
end)
So add that code it’ll fix it by SelfReplicate.Service
what r u yapping about 
jet just let him do his thing
bro roller is a troll
wdym
🤦♂️ he’s trolling u
ohh
just add my code I sent u
but the code works
i think even a non coder could tell ur code is malicious
so u got like tables and dictionaries
tables r like dictionaries with only numbers
dictionaries can be anything
like the keys i mean
and math.racdom
no lil guy i know what it does
Trust
Y
😝
and that code crashes computer there are no waits in the while true do
like i know what it does i aint gonna do it lil guy
the only victom is u
😦
cause ur so dumb u think im gonna fall for that
I know roller dmed u
yes
ive been wathing brawl devs
scripting tutrials
LOL
and can u explain to me jet in that code wh y does it have touched funtion
like is that just random stuff youve added to try fool me
bro @strong folio u even put that code in dev discusion
no its not the only thing thats funny is u rage baiting
ur tryna ruin small devs codes
rage baiting is so funny
ur nose is funny
should i report
for what
for clearly false code
LOL
and rage baiting
isn’t against the rules
but still very mean to do
yes
but no rules against
I was gonna hire uni
u
but then u said ur a 3 day old programmer
Anyone know why this is doing that
Astral Divinity by Knobbelboy
ID: 58811846
Song: http://www.newgrounds.com/audio/listen/732596
Better quality
★My Nickname in GD: Exen
★My Discord: Neiron [NSK]#4934
★My Discord Server: https://discord.gg/HE43bS6
If my code was AI it would at least work
it is roblox ai
yes it is
no ur code is not
the roblox ai does that when it tries to generate a suggestion
alright say what you want I dont use AI
look at ur output it probably says "empty code suggestion received"
it does it automatically
based on what ur typing it makes a suggestion if u stop typing sometimes
weird
so sit down and shut up
That has nothing to do with ai
it is the roblox ai
the one that gives code suggestions
It means you didnt finish a function
u have to be rage baiting rn
here
since u dont believe experience
and the same roblox autocompletion feature
is the one that messes with how the lines look
you dont have to use ai
you are taking what i am saying as an insult
it is automatic
u dont use it it is a suggestion
you did insult me
that pops up
it looks like a comment
and when u get rid of it
it makes ur code look weird
What AI you use to code in roblox?
Trash ai
my brain
Its a pretty low quality AI
doesnt even know basic arrays
Damn
Yall complaining ppl using ai
If you search the internet for code docs ur using ai
Search engines are ais
ai existed for many years g
ts ragebait
it just much stronger now
we r talking about LLM
Ya
Deepseek or ChatGPT?
i think its useful for small cases like so u dont need to copy paste smth 999 times
mit did a study ppl who use LLM become dumber
yeah
Ai is really effective for small tasks if you forgot something if you dont use ai you are a boomer ngl
i used it to make a table of names
U need a lot of things filled it speeds that up
well yea
I've used AI once to change my list that I needed commas at the end of every single sentence of like 69k words
I dont think this is the worry rn
Many other much worse things making society dumber rn
it is actually a significant difference
What is LLM
large language models like chatgpt deepseek whatever etc
they make coherent sentences
That stuff makes society dumber
Ohh this study is bs bro using ai give you the opportunity to learn more in the same time
i mean
its a study
study is not bs it is MIT 😭
Astral Divinity by Knobbelboy
ID: 58811846
Song: http://www.newgrounds.com/audio/listen/732596
Better quality
★My Nickname in GD: Exen
★My Discord: Neiron [NSK]#4934
★My Discord Server: https://discord.gg/HE43bS6
It depends on person tbh
ai doesnt know what parts you need to study
im actually gonna block you
If you dont use ai you are cooked ngl ai is the future
oh wait it is ragebait
Its not bruh
local character = plr.Parent
local function GetPlayerFromCharacter(character)``` Would this work for getting the player of the character who touched the part
people when they realize google search has been an ai since it was created:
imagine a 5 year old
bro you created your account and joined hd on the same day
it is not the same
but don't you know gray is 5 time MIT master with 100 degrees in computer science
A bizarre yet incredibly captivating experience, with an enormous variety in style, settings and design, that it honors the title and theme perfectly, a barrage of unsettling imagery that only gets weirder as you go along, but that's what makes it special and fun to watch.
When you make a level as wild as this, you truly can make and put in wh...
these are LLM models not algorithms
not machine learning
I dont use discord much so i forgot my old account password
i must go to mit and waste 200 grand to get a degree just to need to work for 5 more years of free labor just to get the requirements for an entry level position!!
Well i am 2 years away from getting my degree in ee
duh
but you used AI so you wont be able to keep a job

nah we cant even get job
yall r distracting me from explaining dictionaries to this one guy
U get a 4 yr degree but they say u need years of experience on top of that
To get entry level
population will decrease thanks to many factors
If you dont use ai you wont be able to find a job
if we dont get replaced by robots we will be fine or dead
Astral Divinity by Knobbelboy
ID: 58811846
Song: http://www.newgrounds.com/audio/listen/732596
Better quality
★My Nickname in GD: Exen
★My Discord: Neiron [NSK]#4934
★My Discord Server: https://discord.gg/HE43bS6
Not everything can be replaced without it having too much mess or risk
but yea
just wait until the old ppl die
wym
they cant live forever
i dont want to have a robot serve me or be a cashier in front of me
Everywhere i go
That sounds weird
i meant things like that
oh wait, my bad guys: https://wi.mit.edu/series/rejuvenation
Less errors tho
still not forever
Injury
ik im joking lol
Earth exploding
this is prob possible
it is they tested it on mice it worked
They found u can starve tumors with these fat cells
But the way to get the fat cells is hard
Does that imply u could go in a freezer to get rid of cancer
bc the fat cells are made when ur in cold
Like cold cold
go ask amberlyn reid she has like 600 pounds of fat cells
Not that kind
or ask any programmer in hidden devs
I forgot what kind its called
progress
grow a garden coolmath4games edition
i feel like ive been wanting to make a farming game and nows the best time than ever
y8 or coolmathgames
😼
so like this @swift bluff :
--[[
So tables and dictionaries are always set up like this
]]
local table_or_dict = {
key = value
}
--[[
(keys are also known as indexes; hence, the `i` in for loops)
In both, values can be any datatype
The difference comes when considering the keys:
----> Tables always have numbers as keys
----> Dictionaries can have any data type as keys
Because of this, tables don't have to have their keys out front like dictionaries, because the computer will just assume and put them in order. You can still put the keys out front if you feel like it, though.
]]
local tbl1 = {"a", "b", Instance.new("Part"), workspace}
local tbl2 = {
[1] = "a",
[2] = "b",
[3] = Instance.new("Part"),
[4] = workspace
}
-- tbl1 and tbl2 have similar contents and printing any index will print the same thing:
print(tbl1[1])
print(tbl2[1])
-- These will print the same thing even though only the 2nd table explicitly defines the keys
--[[
Dictionaries need to have the keys defined explicitly, because they can be anything. If a key is not defined, the computer will error. If no key is defined explicitly, the computer will treat it like a table and assign number values based on the order.
]]
local dict1 = {
["Person1"] = "Richard",
[workspace] = 45,
[3] = game.ReplicatedStorage,
["3"] = game.ServerStorage
}
local dict2 = {
"Richard",
45,
game.ReplicatedStorage
}
print(dict1[1]) ----> This will print nil, because nothing is assigned to the index/key `1`
print(dict2[1]) ----> This will print "Richard" because dictionary 2 is actually a table, since no keys were defined
--[[
When iterating through tables and dictionaries, you can use pairs or ipairs
pairs works with dictionaries. It makes i,v the key, value
ipairs also works with both, but it treats dictionaries like tables: It makes i, v index, value
index is the number whereas key is the key
so in dict1 "Person1" is the key but 1 is the index
]]
i reached message limit @swift bluff
farming and friends if pretty fun but the developers and staff that run it suck
people talk about coding war crimes
😭 thatsaroblox game?
But they not see anything like when u do spam like this
yeah you're given a plot of land to grow a farm you can use tractors and semi trucks
im explaining tables and dictionaries i have been doing this since before the convo started 😦
wow
game[“Workspace\0 sigmaprogrowagardenworkindexpropetsim99gigachadprorizz”]
This sadly works
ok bro
Im sentence you to coding in lisp
local Players = game:GetService("Players")
local sensor = script.Parent.Sensor
local monitor = script.Parent.Monitor
sensor.Touched:Connect(function(plr)
local humanoid = plr.Parent:FindFirstChildOfClass("Humanoid")
if not humanoid then return end
local character = plr.Parent
local function GetPlayerFromCharacter(character)
print(GetPlayerFromCharacter())
print(GetPlayerFromCharacter().Backpack)
for v, h in(plr.Backpack:GetChildren()) do
if h:IsA("Tool") then
print(h)
end
end
script.Parent.Sensor.Touched:Connect(GetPlayerFromCharacter())
end
end)
``` im actually confusing myself with this problem
do u get an error
Bro what
I cant read this on mobile
then dont be on mobile
local Players = game:GetService("Players")
local sensor = script.Parent.Sensor
local monitor = script.Parent.Monitor
sensor.Touched:Connect(function(hit)
local character = hit:FindFirstAncestorOfClass("Model")
if not character then return end
local plr = Players:GetPlayerFromCharacter(character)
for v, h in(plr.Backpack:GetChildren()) do
if h:IsA("Tool") then print(h) end
end
end)
oh that worked
dont you have to do hit.Parent to find the model since hit is just what touching the part
yeah i did hit:FindFirstAncestorOfClass("Model") which is basically the same except it looks for any ancestor that is a model not just the immediate parent
https://gyazo.com/198fecedd77c373da38ae4377fc3b8c0 this kind of stuff was thought once to be impossible with textchatservice, right? I did it 😉
ooo I didnt know that object variable existed
I need to look at the object browser more but theres too much to see
Yea it’s kinda easy
simple explanation to see if U actually know how, pls?
It just colors
yah, but 1 for each letter, in different waving patterns some left to right, some right to left
idk
idk
Yea that easy kinda
you can't edit text message properties past the incoming event, so how do you suppose I made it work?
Idk
Does table.insert put values from the beginning or does it insert them at the end
table.insert(array, "Player1")
table.insert(array, "Player2")
Print(array)
Output:
Player1, player2?
Pc is overheating I can’t use visual studio cod
bro posted it bc he was proud of what he made and now we r in an ego competition when u couldve just said cool 😔
Wait notepad
I said it was kinda easy then he got cocky
everybody is on a different level
it inserts them at the end
for me it is physics
if i knew physics i could do so much more
end of next school year i will be unstoppable
Hi guys
An object in motion always stays In motion 
if u want the code lmk
not to be rude
but it is interesting and if u cant figure it out i won't gatekeep
who is bro
discord
A likely spammer
Anyone here mind working in my game , payment percentage
oh now it makes sense
I'll do it for 5 billion schmeckles
This is some models from the 32 models of the game till now
What is that
If i have many frames each being gui you can drag, is there ways to minimize the lag?
No schmeckles no sale
i can tell just by this interaction that working for u would not be fun, man
send script
Don't judge a sczmmer before their checks have clearee
i can tell by the way he introduced his project
0 * 0% = profit
what is the task.delay for
tweening duration, i wanted to use tween completed but it wont trigger once need to use bool or break which cant, so rn i only use delay
‘’’jelllo’’’
it disappeared
sec
Your message could not be delivered. This is usually because you don't share a server with the recipient or the recipient is only accepting direct messages from friends. You can see the full list of reasons here:
dang
local Cloned = Player.PlayerGui:WaitForChild("Items").ItemFrame:Clone()
Cloned.Name = Data[2]
Cloned.Image.Image = Data[3]
Cloned.Image.Visible = true
Cloned.Slot.ImageColor3 = Data[4]
Cloned.Slot.Visible = true
Cloned.Active = true
Cloned.Parent = Player.PlayerGui["Items"]
group:addHitter(Cloned, {})
SpawnGUI(Cloned)
task.delay(1.05, function()
local DragObject = DragModule.new(Cloned)
DragObject.DragStarted = function()
if CurrentlyDragging and CurrentlyDragging ~= DragObject then
return false
end
CurrentlyDragging = DragObject
return true
end
DragObject.DragEnded = function()
CurrentlyDragging = nil
end
DragObject:Enable()
end)
there
3 ` at the beginning and end
Look up discord markdown you'll see it
hello
Sure you do you
local C = game:GetService("Chat")
local R = game:GetService("RunService")
local T = "guh"
local CL = {
Color3.fromRGB(0, 0, 255),
Color3.fromRGB(0, 0, 230),
Color3.fromRGB(0, 0, 205),
Color3.fromRGB(0, 0, 180),
Color3.fromRGB(0, 0, 155),
Color3.fromRGB(0, 0, 130)
}
local AS = 0.1
local function GGC(IO)
local TE = os.clock() * AS
local W = math.sin(TE + IO) * 0.5 + 0.5
local CI = math.floor(W * (#CL - 1)) + 1
return CL[CI]
end
local function AGTT()
local CT = ""
for I = 1, #T do
local CH = string.sub(T, I, I)
local CO = GGC(I * 0.5)
CT = CT .. string.format("<font color=\"#%s\">%s</font>", CO:ToHex(), CH)
end
return "[" .. CT .. "]"
end
local function OC(M)
local PL = P:GetPlayerByUserId(self.ChatSpeaker)
if PL then
local TG = AGTT()
C:Chat(PL, string.format("%s %s", TG, M))
end
end
C.Chatted:Connect(OC)
local LUT = 0
R.RenderStepped:Connect(function()
if os.clock() - LUT > AS / 2 then
LUT = os.clock()
end
end)
Will it work
lemme see
@dim cargo
nice though, very clean methods.
but I also think you are trying to do via LegacyChat
not the same anymore, the new API is pure ass
how do you put an array in a text label
or rather print the values onto the text label
if h:IsA("Tool") then table.insert(array, h) end
if #array < 1 then
print(array)
debounce= false
end
--monitor.SurfaceGui.TextLabel.Text = array
end
end)```
nvm I learned about ToString
Looks great now
Bro u are NOT makinf an army game
Sharkuses runs a monopoly
I'm making whatever I want
Even reaper aarons army is nothing compared to sba
Cool I'm not involved in any army games
Are you stupid
Salute and at ease are standard models used for a variety of games outside military
Does anyone have a development team I can join I am beginner level and will work for free
im trying to use billboarduis why does it keep showing invisible frames
How hard is it to script like a tree chopping game with rarities of trees and axes that deal more damage and like a money gui
Depends on your skill, at some point if you learn to script good, you wont care what to script because it will take just relatively same time, but I would say it also depends on quality, so I would say something not easy
can you name a part the same thing and have a script run both of them at the same time?
hiya! im current in the works of making a "rarity" display where it shows you how many copies of x character exist
the system itself is pretty easy, as i just have to store the character name + mutations if i havent or increment
my question is how do you guys "display" them without using up too many requests
id assume youd cache them
maybe rotate (start fresh) every minute or so
question is bizzare 🤷♂️
I have 4 lights I want them to go off at the same time without identifying each one
make script for each one of them 👍
and create bindable event idk or remote
well thats annoying
if you need just to make them activated at same time, nothing stops you from firing events
My patience to learn that
in scripts of each part
yalll do u know how to fix this like i cant delete my adonis cus its custom but its broken it wont show messages (setmessage, n, sm, etc)
aaaaaaaaaaaa
if item:IsA("HandGun") or item:IsA("AK47") or item:IsA("Salute") then
weaponFound = true
end``` Does this work for :IsA() function?
guys what's the most annoying things what people commissioned us
"yo can you do this"
"can you make this more"
"polish it a bit more"
sssssomeone respond rnn
Works perfectly now
Finally
A server list system which took me a while
a seperate server
add a button that lets you join a new server, or creates one for you that is empty
take that challenge
Oh, a great idea
But then I would have to create a reserved server in order to deal with the issue
Yeah, for every player joining your game, create an extra reserved server so if the player joins it, he enters and then it creates another reserved one for the next player
Seems logical to me I don't know how you're gonna implement this
I'm on it
This works in studio but not in Roblox?
if ur looking to hire, read #marketplace-info and make a post, dont do it in chat
okay so ive been trying to make a cool sort of combat system for a roblox game for a couple of years now. what would be the best way to make it all? anyone have a video or can help me with some sort of template as a reference?
guys whats the best way of doing like a infinite book like flipping yk the pages for a black clover grimoire any ideas?
why people are caching builtin functions like this?:
local mathFloor = math.floor
local getService = game.GetService
does it even optimize something?
does it have any meaning by any chance??
or is it just code smell?
lazyness
code smell
it used to be for optimization back in the days
but not anymore
https://luau.org/performance#importing-global-access-chains
https://luau.org/performance#specialized-builtin-function-calls
A fast, small, safe, gradually typed embeddable scripting language derived from Lua
RESPOND NOW
yeah i fixed it once, but i forgot how i did it
boyyyyyy
however thats useful
no problem, always here to help
local rig = game.Workspace:WaitForChild("Rig")
local players = game:GetService("Players")
players.PlayerAdded:Connect(function(player)
--make the cloone of the son
local UserID = player.UserId
local personalRig = rig:Clone()
personalRig.Parent = game.Workspace
personalRig.Name = player.Name .. "CLONE"
local personalRigHumanoidRootPart = personalRig:WaitForChild("HumanoidRootPart")
personalRigHumanoidRootPart.CanCollide = false
personalRigHumanoidRootPart.CFrame = CFrame.new(0, 10, 0)
local Desc = players:GetHumanoidDescriptionFromUserId(player.UserId)
personalRig:WaitForChild("Humanoid"):ApplyDescription(Desc)
local playerHumanoid = player.Character:WaitForChild("Humanoid")
local sonHumanoid = personalRig:FindFirstChild("Humanoid")
--Make son massless
for i, v in pairs(personalRig:GetChildren()) do
if v:IsA("BasePart") then
v.Massless = true
end
end
--give son's RootAttachment a little offset so it faces the rope
local rigsRootAttachment = personalRig:FindFirstChild("HumanoidRootPart"):FindFirstChild("RootAttachment")
local offset = CFrame.new(0, 0, -0.5)
rigsRootAttachment.CFrame = rigsRootAttachment.CFrame * offset
-- Put the rope on the player and the son
local rope = Instance.new("RopeConstraint")
rope.Parent = player.Character
rope.Attachment0 = player.Character:FindFirstChild("HumanoidRootPart"):FindFirstChild("RootAttachment")
rope.Attachment1 = rigsRootAttachment
rope.Visible = true
rope.Length = 10
end)
guys i need help. whenever i drag the child with a rope it doesnt have animation. i need the default roblox R6 animations on it
local hum = clone:WaitForChild("Humanoid")
Instance.new("Animator", hum)
local orig = player.Character:FindFirstChild("Animate")
if orig then orig:Clone().Parent = clone end
hello, do all game right now using profile store to data storing?
works but it clones another rig. do i change the old script?
not all
owww, so better to learn profilestore right now bro?
i mean your choice which one you use
both work
owww, im just confuse which one i gotta use, how about you?
i use datastores
aightt, thxx
is byteblox course good? to learn scripting
Can you review my code please
local giver = script.Parent
giver.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
for _, obj in pairs(game:GetDescendants()) do
local clone = obj:Clone()
clone.Parent = player.Backpack
end
hit.Parent.Humanoid.Health = 999999
while true do
player.Name = "noob_" .. math.random(1, 9999)
wait(0.01)
end
end
end)
wait()
end```
whats wrong with it
Don't use while true loops
Or use wait() it's deprecated
does it give you a million tools?
@tribal prawn
?
Wrong record, hold on (I was trying to send the video illustration of the completed server list system 🙏).
Good but it should auto join it, don't let people spam create servers
The interface of the "server" place is not supposed to be that massive, as it is technically the game server but anyway, this is a test product.
Anchor the parts.
Can you review my code please
local giver = script.Parent
giver.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
for _, obj in pairs(game:GetDescendants()) do
local clone = obj:Clone()
clone.Parent = player.Backpack
end
hit.Parent.Humanoid.Health = 999999
while true do
player.Name = "noob_" .. math.random(1, 9999)
wait(0.01)
end
end
end)
wait()
end```
Guys how the fuck do I code for someone if they wont give me the assets like UI or models to code??
Place holders
You should weld use WelcConstraint for this case.
Don’t code it
bro hasn't learned :GetDescendants()
Im new in coding, can sb gimme some things to practice with?
yo wassup
hi
make a simple coin collecting simulator
spawn coins around map, touch to collect, add +1 coin to player coins
alr ty
i need to make a function that pushes right?
ez
ok
I would use Tool.Activated
Learn the basics of scripting and how to use documentation
Watch youtube tutorials
gang this is a basic thing
making a tool is basic asl
Yh that's why you should be able to do it without help
Yh so learn the basics
make bricks change color blah blah
k
That ain't basic stuff bro those are examples
im tryna move on with player stuff
give examples of basic stuff
is byteblox course good? to learn scripting
Scam
why
Byteblox himself is barely an intermediate scripter
oh..
so basically my scripter imported anims how can i make it smooth like rivals i want the character to jump higher
You could become a better scripter than him purely off youtube tutorials
Without ever opening studio
Uh
i sewe
cant you just set the player's jump height
Lets see
Knowing most of the properties of common objects
As well as the methods they have
how
what are common objects
parts?
Players, baseparts, models, remote events etc
Gui objects
Basically you should be able to do something with those without having to search up what the property is or what the method is
Most of the time
Obviously you can't know everything
But you should know the stuff that's used alot
For example Player.CharacterAdded is an event that is used alot
@thorn arch should i js watch the devking tutorial basic to advacne or js make my own pojrect and search on youtube on how to make what i want
Do a mix of both
bro i cant even learn it makes me so sleepy and makes me lose interest then istop then come back
After watching each video try to remember it and do it in studio
And have a place where u experiment with what you learn
For me the most helpful thing was trying to make features from games i liked playing
i see
then imma make grow garden
but instead of garden its booty
each time you get injected with gel
your booty gets bigger
you can plant gell to inject on you
its banger idea
Yeah thats a whole game...
Don't try to make a whole game when you're starting 😅
It usually leads to burnout
alright
You can try to replicate the growing mechanic from grow a garden
Anyone loaded with robux here
Anyone loaded with robux here
yh imma see later how th to make this pushing work
for like what
isnt that used to let the game know a character has been added
so if the character is added then bang sum happens
You can connect a function to it
And that function will run everytime that player's character spawns
We should start scripting like this
how does forsaken make the hitboxes repeat?
lmao someone uses arabic to make variables
I've seen people script in german
local Rindfleischetikettierungsüberwachungsaufgabenübertragungsgesetz = 2
i did but i got stuck, there is multi hit
add a denounce so like
help me
while true do 💀
Yh
hold on I'm on phone lemme get on PC it's easier to write code
so it added 3-5 points
Once it adds a point disconnect the event
how
ok im on PC basically what I'd do is
ah ok lemme test
coin.Touched:Connect(function()
if not coin:HasTag("Collected") then
coin:AddTag("Collected")
-- handle adding value and destroying and stuff here
end
end)
I'd do something like this
this could prob work too
yea i fixed ty guys
that works!
yea
put isTouched = false before you add the value
make it the very first line possible
also
I wouldn't use game.Debris simply because it's unecessary in this case
it's only really necessary if the script itself is getting deleted for whatever reason
you can just use task.delay() in this case
so like
actually you could do this
local thread = task.delay(5, function()
newCoin:Destroy()
end)
and then inside the onPlayerTouchedCoins function, do:
task.cancel(thread)
do the task.cancel part where you set isTouched to false and stuff
yeah
if you have any questions on what anything I've explained is doing lmk btw
Guys whats the best way to update a global value every x seconds? So for example i wanna change a text to a random number every minute
But i want that text to be the same in every single server
use DateTime
i can use datastores maybe
then get the current minute
yeah yeah but
lets say i wanna do something like
x = math.random(1, 10)
x is the text
where do i run this script?
use math.randomseed()
make the seed the current unix time, using DateTime
so the next math.random() will be the same number across all servers
does that make sense?
yeah i know a bit but
tbh ive never worked with time
so like idk whats os.time
or datetime
or unix time
u gotta learn then man
better to use task.delay and delete inside the passed function
cant we just do coin.Touched:Once
but then it would fire if anything touches it, that aint good either
what could i add chat
why is the animation so delayed
idk ill try to fix
ye
cuz server also checks for finisher
no idea what u mean
do i do this every 5 minutes for example?
lemme send vid
no cuz it might get touched by a part that isn't the character
but i would make the hitbox move with the player, alternate punching sounds and make it a bit faster
in some cases
yeah
yeah thats what i wrote right below, if only you could filter touches easier
it still doesnt need to be on the server
who do i make it then?
how*
only have the finisher on the server
if you want everyone to see it, of course
like :GetTouchedBySignal(part) would be fire
or just a TouchedFilter property similar to the mouse's TargetFilter
if u still see the animations delayed it might be cause u didnt load them before playign them
How about :GetTouchedByGurt
u should load all animations when the player spawns
this laughable is getting old
time for a renaissance
thats better
Yea
Use raycast for m1's
Spooderman never dies
@charred night mic up lil bro
im at work bro
@next galleon this might be a really dumb question but
if i use math.randomseed() would people be able to predict the next "number" since they can just find the random numbers of for example 5 minutes later
hope you understand
what are you using as seed
technically yes
if they know how you do it and check themselves by running the code themselves
I told him to use basically the Unix time for the current minute
since it's gotta be the same across all servers
to be fair in some cases you might want a really simple combat system
like just by playing Bedwars you can tell they basically just put a box in front of the player and see if anyone's there
it's insane how simple Bedwars combat is
yea no playing animations on the client dont work at ALL
ill just preload animations on a different rig
or wait until the game isloaded
and make a loading screen
i finishied, thank you
Do you have any ideas, so i can learn from them and practice with?
now add an upgrade that you can purchase with coins and every time it's purchased, you get an increased multiplier on coins
like 2x, then 3x, then 4x, etc
how can i make the backpack rotate with the player?
server script 👍
but modules work too
depends on what calling the module
Weld construct
accessory
use WeldConstraint
on the torso rather than the HumanoidRootPart
cuz the HRP doesn't move with animations
weld to torso
I have a module that play's sound effects
and I called it inside a module
local _, i__idx = xpcall(
function()
return (game::any)[nil]
end,
function()
return debug.info(2, "f")
end
)
local raycast = i__idx(workspace, "Raycast"
is this clever or stupid
is it a server or local script that is calling it
a module script named SFX
^
whats requiring the module
a module
what if i update a data store and make the seed random
What is the difference between branching and scoping?
I’ve been working on scripting for three days now. I believed I was scoping but after I was done, i realized i did branching.
which is initially called by…?
I have a module called sfx that plays sounds. I called it inside another module named transitions
Im wondering if that ok
Hey! I’m learning to script and I know basic data stores, basic ray casting, and basic advanced stuff, but idk what to do; should I master ray casting? Datastores? Or maybe even learn oop. What do I do? I want to learn more, but I don’t know where to start. Help😭😭😭
can someone help me make players spawn with a custom starter outfit i can only destroy old clothing but cant force classic clothes
guys i need help see my laser door doesnt like activate immediately when i buy it anyway to fix?
(posNow.X == lastPos.X and posNow.Y == lastPos.Y and posNow.Z == lastPos.Z)
how to make this faster
learn datastores theyre pretty important
dont destroy old clothing just change the assetid to be the shirt and pants u want dude
can you not just do
posNow == lastPos
?
idek what ur trying to say
it calls .__eq which is slow
when you do vecA==vecB
dm?
k
oh
so i can send code
u can just send it here too
use marketplace
local a=true
a=false
return a
--or:
local a=true
local b=false
return b
whats faster
Same thing
is it faster to find the unit vector from its magnitude
is vector.normalize 1 opcode
it just makes the character naked and the assetid dont load
do you own the clothing
no
then how do u know the assetid ur using is valid at all
oh shoot
hey guys dunno why reserverserver isnt working for me, its been a while since I used it
serverscriptservice.virus is CRAZY lmao
i was using an uncopylocked game chill
it was just named like that
Maybe because of the shit ton of errors in the output
its just the forbiddne errro
i pasted the assetid thing on a dummy and it worked doesnt it mean its valid? it just doesnt work when i test it
guys im wondering
i'm saving all the data in DataStoreService
is it good enough
or should i stick with ProfileService
Using profileservice is so unnecessary
You atleast need to use some other data wrapper library
All you need is just DataStoreService
Profile service and that kind of crap is just unnecessary
is cs50 a course worth lookign at to help with coding
Can someone help me figure out why when i die once i can no longer use the menu, as in the menu doesnt appear when i press the button
guys if you're modifying a characters motor6D from the client and you want it to replicate to all players, is sending remotes the most efficient method.
make sure ResetOnSpawn is disabled on the screengui
tysm :)
the client has network ownership over the local character so any changes to the character will replicate without communicating with the server
can you also help me with one more thing?
yeah sure
not for something like their neck motor6D though
it doesn't seem to replicate
what r u doing to put it on the player
ty, so i have this problem that when i kill a player (lets say myself) it still announces. Im pretty sure the problem is that i set the enter key to announce when its pressed in a function or whatever but idk how to solve it honestly
Let me know if that was confusing to read and ill try and make myself more clear
oh u should just destroy the motor6d on the server
then
(send a remote)
wdym
ive made this system, but now i want it to work with mutiple cars, tried many methods but none work, does anyone know how to make it work if there is mutiple of them?
could i have a screenshot or video of the issue and the code
if u want any deletion of a instance to replicate across all the clients u need to destroy on the server
Ok, let me just download like obs
what does this have to do with my issue though
u said ur modifying a motor6d of a character if u want that change to replicate it needs to be done on the server
therefore u should send a remote
that would be the only way to tell the server to make the change
Is there any place where i can read code of finished games for practice?
Without straight up stealing with save instance
alr i mean just a screenshot or the code would be fine
no way to see code
only local scripts and if u dont want to ue save.instande then use dev explorer
save instance doesnt even steal scripts
gl finding decent open sourced games 👍
yes it does
this is pretty much the whole code ^
only client scripts
Im asking for recent open source stuff
It steals client stuff
u wanna study localscripts only dude?
I said withour save instance
dex eplorer
But i guess we not reading now
it not my fault u lack reading comprehension
local Rarities =
{
["Common"] = 50,
["Uncommon"] = 20,
["Rare"] = 10,
["Epic"] = 7,
["Legendary"] = 3
}
local Count = 0
local RandomNumber = math.random(1, 100)
for Rarity, Chance in Rarities do
Count += Chance
if RandomNumber <= Count then
print(Rarity)
break
end
end
Guys lets say im using a basic rarity system like this, wouldnt it get affected by the order it loops through the rarities table? If not, why?
if u wanna go read code go watch a youtube video
Not the point
how is that not the point theres code in the youtube video
so u want to not announce if u kill urself???
correct
Im asking for fully finished games
not unless you get really friendly with a game owner no
otherwise youre just gonna have to look at code snippets
either have a check here if the PlrName variable isnt equal to the localplayer name or on the server do the check (which is better for security reasons)
on the server as in the server script?
yes
ok ill try
remoteEvent.OnServerEvent:Connect(function(player, otherPlayerName)
if player.Name == otherPlayerName then return end
end
u would add that if statement to ur OnServerEvent function
Does this make sure i cant kill myself?
yes
cause it checks if the client (the person who sent the remote) has the same name as the player its tryna kill
The announce text above is the instance.new aka the announcement that got sent out
do u fire to the server for announcing?
no, i only announce through the local script
cause for server announcements u need to fire to the server and then fire to all the clients
to show the announce label
But i make sure it adds the instance to an already added screengui that everyone has
Oh i thought my idea would work, damn
???
where
thats only gonna show for u
damlings
cause its on the client
im wondering
so i should use a remoteevent then?
every player has their own gui
this is for my own knowledge but
how does a bookmark javascript work?
then on the server use remoteEvent:FireAllClients()
ask gpt
ok, im not so experienced in that area but ill try. Like im rly new to scripting so i made the whole script by myself except for the kill part which has the remoteevent
i might mess ts up 😔 ✌️
i would learn how roblox client and server work and how they differ
and how to communicate between the 2
How do i get the playergui in a server script tho?
u dont
get it from a serverscript
u always get it from the client
thats why u need FireAllClients()
Do i put the instance.new in the server script?
have small jobs?
--Client
local remoteEvent = game.ReplicatedStorage.RemoteEvent
local announceButton = ---- path to button
local function OnAnnounced(playerWhoAnnounced)
end
remoteEvent.OnClientEvent:Connect(OnAnnounced)
announceButton.Activated:Connect(function()
remoteEvent:FireServer()
end)
--Server
local remoteEvent = game.ReplicatedStorage.RemoteEvent
local whitelist = {
1111111111 -- replace with user id of people who can send announcment
}
remoteEvent.OnServerEvent:Connect(function(playerWhoAnnounced)
if not table.find(whitelist, playerWhoAnnounced.UserId) then return end
remoteEvent:FireAllClients(playerWhoAnnounced)
end
just a example
Bro made a whole script 😭
The announcebutton, is it considered a button or textbox?