#code-discussion
1 messages Β· Page 56 of 1
tyy
im doing a similar thing in my rpg
but only for non hostile npcs
because my npcs are way too advanced to justify making them client sided as well
good luck
???
o ty
idk i might make them client sided eventually
its just hard with the current system and not worth the effort
cuz like you said the server has less computational power then the client so wouldn't it be faster if they are client sided?
yea i suppose but the logic would have to be done on the server anyways
otherwise an exploiter could mess with it
o fair
i might make them like a gray cube on the server and the client renders the humanoid
but thats still a lot of work
because the way i have it set up enemy npcs and players have the same systems
o i see
wouldnt the client see that though?
bruh i need to learn more about networking
no it would be invisible on the client
yea its important
how would you render something differently on the client and server? unless you rebuild the entire npcs on the client?
or.. just use two different models*
Oh no I didn't get scammed, just felt a need to say it
he hired like 10 scripters to work on the same task. Bro is so intelligent he added everyone into same server
You said it was a scam?
but you said it was a scam??
Probably means he nearly fell for it
o
Look, he offers 500 dollars for quite a easy job, he had 10 scripters working on the same task, and wanted to add his UI guy into the project
If that doesn't scream scam then idk
Yup, that is NOT a girl π
you just change it on the client
because it doesnt replicate
o
Hello, just to inform everyone. Do NOT take commission from @adi_royyy . It is a scam, he offers 500 dollars for something that can be made in few hours, he also had 10 different scripters working on same task and he will ask you to add his UI guy into studio where you make scripts and they will just steal it without paying you. For anyone wondering I didn't fall for it, I am just warning everyone else.
changing something on the client only changes it for the client that the action was done on. changing something on the server changes it for all clients
Yeah but cuz the server replicates it to clients rendering two different models one for the server and one for the client is confusing for me .. but I think I understand how to do it
you make a model (or ig a block in this case) on the server which replicates to all clients. then, each client makes a rig associated with that previously made model/block
Can confirm, put out a report. I'm glad I ain't bite and didn't use the team create
why does scripting get 2 channels this is not fair π‘
wheres the 3rd
it's a sercret cool hidden one
scripters just superior i guess (no creativity to build or model)
aura
I just keep getting scam commissions π
but I don't take them
you can tell its a scam
way too many scammers out here
yeah so he was gonna make me build a map for 2 usd 
Im just tryna get some shit for my portfolio while also comming
hope you get good comms π
paying 1k robux for invenrory + shop
optimizing a huge chunk of your code and it actually working is such a huge pay off
d2 ragebait
nuhuh
What level of stupidness am i on?
i write python code on Roblox πΏ
time.sleep(1) ahhhh
for an half an hour
sob
does anybody have an idea for random script?
guys does my website work https://zaid-daily.github.io/FinalFolio/
HECK NAH GET RID OF LIGHT MODE
why
is the music good
i just learned how to script whats the best way to get experience
do some work for small games
how to find small games
i have a small racing game you can join
really
yeh
ok
hi guys, is it better to create a prompt with just a single billboardgui, or should i create it with the actual "ProximityPrompt" object?
u can make a custom proximityprompt using billboardgui
Depends
Are you looking for a basic prompt or a customized prompt
Does anyone know how to fix a "cube shadow" where it would be placed, but not showing ? For eg, placing a cube on tile A1 but when i want to place a cube on the A1_Y1, the shadow is still snapping on A1 tile and not on top of that A1_Y1 cube
i just saw some code where it was checking a players head color and it was something along the lines of player.head.color == brick.new(insertcolorhere) why did they make it brick.new or whatever and not just set the head.color to a color
dm me if u wanna make a stay alive / steal time sort of game. ill give u 2k robux + 70% of the game. i can do 100% of the ui and some minor scripting + ads. btw pls be experienced
alr go dms
my character is jittering after they jump because of my animation, simple fix?
is it fine if i dont use a local script for a killbrick
just use a script
dosent have to be local
jumpscare
Wild
does anyone know what type of hitbox deepwoken uses?
can someone send me a link to the lua documentation
dm me to make a sword fighting / steal time game ill pay for adds. u get 70% of the game +2k robux
and btw u must be experienced in scripting. i do vfx ui and modeling
not here pal
2k robux is 7 dollars
its mainly for fun im just giving the robux as an extra besides i pay for ads so that 70% is worth it
people may not work for fun. alos the 70% is not even guaranteed
it could be 70% of 100 robux or 100 million robux
what advice do yall give to people who try to use localplayer on a server script
Localplayer is attached to all Local Scripts to be the Player that owns it, while in a ServerScript they have no owner, so localplayer wont work there
hello everyone, I have a question. making a building system in which you can place a table on a grid floor, once placed, you can destroy it or change its position. is network ownership required for such task? thank for answering, I really appreciate it.
look up How to create a Plot Placement System in Roblox #1 - Plots & Players on youtube, full guide for exactly what you want in steps
network ownership is for physics, when placing a table on a grid floor it's anchored, right? so it doesn't move
yes, I want it to be anchored. but still be able to move later on to a different position.
do you want the player moving the table to be visible to other players?
nope
then if other players don't need to see the table that the player is moving, then network ownership is not required as you're not replicating anything (moving and showing to other players)
Is there any advanced scripters here looking for like really good modeling and mapping work.
thank you so much, really appreciate it β€οΈ
thank you, will watch!
dm me if ur an advanced/experienced scripter i have a com for u
creating a game with 3 devs who join
ye i here
dms
is it worth making a tapper game at this point?
guys im bored, can you give me something to script? (im around low intermediate level)
can you make a sistem that only let's your send a RemoteEvent and if the person isn't you he/she gets kicked
idk how to kick people yet
then kill he/she that tried
but the RemoteEvent is the main thing of the idea
make a sistem that only let's your send a message trough RemoteEvent and if the person isn't you he/she dies
its hard for me to understand what your saying π
so you have the event
if someone do :FireEvent
and if that person isn't you
she dies
Make the GUI fully functional, including the Drop, Use, and Give buttons, the Amount input slot, Hotkey slots, Ground slots, and Inventory slots. GUI made already payin $10
I'm a newbie at scripting, I already have the basics done, but I wanna know how I can improve from here. What would yall suggest I do to improve at scripting?
just make shit
That's what I've been doing making random system and shit, but still wanted to ask if there was a better and a proficient way of getting better
i mean not really, maybe making a mini game
like a game based around a system
to practice connecting multip[le elements
but besides that theres not really much u can do besides practice
Appreciate the time and feedback
Goodluck
lf a scripter for my game ill pay u must be experienced
learn the easy stuff then hard stuff really
all hard stuff is just a whole bunch of easy stuff
hi
hey
do tweens automatically clean themselves (by cancelling) when the instance is destroyed? or does that need to be done manually
pretty sure that happens automatically with any connection related to the instance
How do I create a system for my obby that when the player joins they are at the lobby then they click a UI button that teleports them to there last checkpoint. I need help please! Ping me if you respond. Tysm!
That's a super easy feature to implement, lol
Could u help me?
Do you have any Luau scripting experience?
I'm trying to learn I've been watching videos but its like japanese to me
I've been scripting for 8 months. Do I start looking for commisions?
no
you need a big portfolio
Write me a function that, when given an array of unordered numbers, returns the most frequent number
In O(n) time, if you understand what that means
make a somewhat complex game and then look for commissions
whats O(n)
so the mode
Linear growth
The function's time complexity should be proportional to the input size
For you, that means no nested loops
So, attempt to do this without nesting loops
Formally, I'm asking you to produce an algorithm that yields the mode of a dataset
In layman's terms, lol
i guess its not that hard
If you can do that, it shows an intermediate grasp on algorithm's and data-structures
That's enough to start taking basic jobs
I don't know how π
Do you wanna give it a go?
sure its just counting the most frequent number
where do i even start
Make a function that accepts an array of numbers? Lol
Bro is destroying confidence one knowledge gap at a time
imma be fr dude this guy treating you like your a software dev
ur not your a Roblox dev your head ainβt all there
A Roblox developer could solve this problem 
what if heβs like 13
A 13-year-old could do this too
even they could solve it if they knew logic and luau
It's all about how much you know, lol
give a more general programming assessment
that is general enough
It's as general as it gets
i hate to break it to you but your completely wrong
how is that wrong?
@hoary cedar is this good? it returns 3
Yep
It could be made cleaner though
How would you guy's store stuff like equipment (backpacks, etc) im thinking just using a data table for each player and store which ones they own with the equippedBackpack and just save and load that data is that a fine way to do it?
have a ownedBackpacks = {} table
and then equippedBackpack
Can i see you do it?
im guessing the ipairs() loop is slower since its ordering the numbers?
local function getFirstMode(numbers: {number}): number
local result = nil
local frequencies = {}
local bestFrequency = 0
for _, number in numbers do
frequencies[number] = (frequencies[number] or 0) + 1
if bestFrequency < frequencies[number] then
bestFrequency = frequencies[number]
result = number
end
end
return result
end
def looks cleaner than mine (forgot to space)
why not just local result instead of local result = nil
doesnt really matter
it just makes it more clear it equals nil
i think theres a bug in your script because its printing 1 instead of 3 on my set of numbers?
is there a way to force default R15 proportion sizes
thanks
why not just use r6?
Hmm yeah
and i think you can inside the same menu u change the avatars to use r6
There was, but I patched it
is this a good way to do this
yall look at this fucking circle i made with terrain gen
is it possible to limit where mouse movement can go?
i'm wanting to have it so the mouse, while the frame is visible, can only move along the edge of the outer circle
i honestly have no idea
because i'm making a weapon wheel, if the mouse moves say too far up, left, down, or right, and continues the circular motion, then it won't be orbiting the center circle, so wouldn't properly be rotating the cursor around its full area
i'm fresh out of ideas, fingers crossed i can get some help from someone π€
get the radius of the circle
and the center of the Circle, so x, y
local function limitMousePosition(mousePos, centerX, centerY, radius)
local distance = math.sqrt((mousePos.X - centerX)^2 + (mousePos.Y - centerY)^2)
if distance > radius then
local angle = math.atan2(mousePos.Y - centerY, mousePos.X - centerX)
local newX = centerX + math.cos(angle) * radius
local newY = centerY + math.sin(angle) * radius
return UDim2.fromOffset(newX, newY)
else
return UDim2.fromOffset(mousePos.X, mousePos.Y)
end
end```
i took this from google btw
it looks right to me π€·ββοΈ
oh wait is the uh
is there like an actual square frame thats not visible
π
Am sorry in advance for chucking such a big pile of text here, but everyone in #code-help is doing anything but helping when i sent it there, so im trying here
Im trying to script this box so that it will change color and toggle particals based off a rarity, which can also be reverted to original by doing the prompt. issue is, it is not changing to the correct things. It is almost like the box and output are running off two sepreate instances of the same script? What am i doing wrong here?
gotchu gotchu
u can get the radius by using the property in UICorner
and use this
ya
its because
ur calling the function each time for the check
store it in a variable
inside the while task.wait()
do local randomEvent = chooserandomevent()
and then check if randomEvent == and stuff
and print(randomEvent) and all that stuff u wanna do
because
i dont have much knowledge to scripting so yeah
having to use every braincell for this lol
ur doing print(chooserandomevent())
chooserandomevent() returns the random event name or whatever.
now the problem is for each if statement ur doing chooserandomevent() again which returns a random event again which might not be the same one as when it was printed
so u can create a variable to store it
local randomEvent = chooserandomevent()
ohhhhhhhhhhh ok i understand now
itll be stored here
yeah that makes sense
π
thank you so much
np
gonna try that there now
ight
ok yeah that fixed the issue
thanks again
gonna continue rattling my brain now lol
no problem lol
GUYS THIS IS QUICK
is there a way to pause an animation while playing
like its playing and after a second it pauses
And after 2 seconds it resumes
:AdjustSpeed(0)
:AdjustSpeed(1)
Doesn't that consume alot of memory?
And it also resets
wdym
that's not the way things work lol.
bruh just added it to my script and now this
if you have a piece of code using a lot of memory, it could just be your implementation having logical errors
you haven't given much context beyond that
No no it didnt consume alot of memory until i started using :AdjustSpeed()
i highly doubt that it's because of AdjustSpeed by itself. this just feels like trolling
^
has anyone else encountered bad_weak_ptr in studio
i don't think so
i submitted a bug report for it over a month ago and they said theyre working on it but its not been fixed and its literally crashing my game
lemme record it
alright @bronze path you had reason its not because of adjustspeed
what was causing it?
lf scripter who can do combat system, scripting animations and VFX etc dm for more info (small- medium) tasks.
How do i make so animation doesnt reset?
wdym exactly by reset? like the animation plays for one cycle, and doesn't loop? or does it abruptly stop at some point?
nevermind, fixed
ty for your help
am scripting a bumper cart, what do yall suggest is the best 2 things to use for the movement/rotating of the vehicle
@scarlet knoll i figured it out somewhat and now it turns quicker thanks for explaining
the code help section isnt working
i need help on a studio problem
has anyone here left something 100% working and then come back to it Not working?
Someone test my game pls
https://www.roblox.com/games/105449881994930/Boiling-Water-Reactor-Testing-Place
Is there an Arabic person who can help me explain OOP to me?
So i dont know how to code and I'm trying to make an NPC spawning script. It spawns one NPC that works perfectly and then just stops spawning them. however in previous iterations the NPC's didnt work but they were able to spawn in multiple
send script to me in dms
in my game, all players have an inventory of objects they own. no object ever lasts forever though, as each object has its own duration (could be seconds, minutes or even hours).
now, what i'm trying to do is have a gui that can display a countdown for each object so that players can see how much longer they have before an object disappears.
since different objects are going to have different durations (and therefore different countdowns), what would be the best way to make these countdowns?
i was thinking about running a thread on the server for each countdown, where every 1 second it decreases the duration by 1 and it sends the updated duration to the client. i have however two concerns with this method:
- remote events can take a while to fire on the client if his wi-fi connection is bad (so the countdowns would lag)
- the server would struggle to run many many countdowns at the same time for all of the players
Someone test my game pls
https://www.roblox.com/games/105449881994930/Boiling-Water-Reactor-Testing-Place
another way would be to straight up run the countdowns on the client, but then i fear exploiters might edit the duration to infinite
L rizz
it was chatgpt couldnt be fixed
oh dang
Me again, this time with a question on how to approch something.
i wanna make it so if the event chosen is the same as last time, it will not run. i already sat up a varable that should log what the last event was. Issue is now i need to make it rerun that for loop if it was the same event to get a new event. How could i do this? I tried to just type continue but as i expected - it did not work
is the currentcamera's cframe able to be edited via a local script
it can only be edited by a local script
Someone test my game pls
https://www.roblox.com/games/105449881994930/Boiling-Water-Reactor-Testing-Place
Hey
Hey
Heyhey
Hey
@hasty mesa
#include <iostream>
#include <cstdlib>
#include <ctime>
int numberRandomizer()
{
int randNumber = rand() % 100;
return randNumber;
}
int compareNumber(int randNum,int guess)
{
if (randNum == guess) {
std::cout << "Congratulations!!";
return 0;
}
else if (randNum > guess) {
std::cout << "Guess is too low, try again";
}
else {
std::cout << " Guess is too hight, try again";
}
return 1;
}
int main()
{
srand(static_cast<unsigned>(time(0)));
int num = numberRandomizer();
int numOfGuesses = 0;
int totalGuesses = 10;
int guess = 0;
std::cout << "Welcome to Number Guesser.\n";
while (guess != num && numOfGuesses < totalGuesses) {
std::cout << "Please enter a number.\n";
std::cin >> guess;
numOfGuesses++;
if (compareNumber(num, guess) == 0) {
break;
}
std::cout << "Guesses remaining: " << (totalGuesses - numOfGuesses) << ".\n";
}
if (guess != num) {
std::cout << "Sorry, you've run out of guesses! The correct number was " << num << ".\n";
}
first c++ code in a while
wanna refresh again
Can you send the code of the choose random event function
i did, it is in the image
so you can test urself?
just so I don't have to type the whole thing out
Basically the two options here are to make it construct a new table of possible events every time it selects, or just have it repeat the selection function until it returns a value that is not the recently-selected event
local Events = {
["Fire"] = "FireEvent",
["Hardware"] = "HardwareEvent",
["Power"] = "PowerEvent"
}
local Rarities = {
["Fire"] = 30,
["Hardware"] = 40,
["Power"] = 30
}
local chooserandomevent = function()
local randomNum = math.random(1, 100)
local counter = 0
local lastEvent = nil
for rarity, weight in Rarities do
counter += weight
if randomNum <= counter then
if lastEvent == rarity then
print("event occured last round")
else
lastEvent = rarity
return Events[rarity]
end
end
end
end
i made something like this in java
i kidna wanna learn java too
making custom MC mods sounds fun
c++ is better for me
ye im trying the lather of those options, to make it repeat till it isnt the same one
i also cant get the "lastEvent" varable to update
https://github.com/LucasW962/Turned_Based_Combat is this good enough for the cpp role
this is because the lastEvent variable is created inside the function. basically every time the function runs, lastEvent is set to nil
ohhhhh yeah that makes sense there. forgot bout that
you have to declare the variable outside
try this
local lastEvent
local chooserandomevent = function()
local totalWeight = 0
for rarity, weight in Rarities do
if rarity ~= lastEvent then
totalWeight += weight
end
end
local randomNum = math.random(1, totalWeight)
local counter = 0
for rarity, weight in Rarities do
if rarity ~= lastEvent then
counter += weight
if randomNum <= counter then
lastEvent = rarity
return Events[rarity]
end
end
end
end
the change I made was to total up the amount of weights, but not add the lastevent rarity to the total weight
and increment the counter based on the weight
if that makes sense
yes
this basically instead of 100%, it totals up based on the amount of values
so like if each rarity weight was 1, meaning
fire = 1
hardware = 1
power = 1
the chance to get each one would be the weight / Total weight
so 1/3
how much should a scripter get paid to make a good game
computer is compressing it
for rarity, weight in Rarities do
if rarity ~= lastEvent then
totalWeight += weight
end
end
this code block?
that basically makes it only add the rarity if its not the last event
it only adds to the total weight based on the condition that it's not the last event, so it cant do the same event back to back
lol
lol
hmm
hmm
this is why i plan on doing art and design for a career and not programming smh
anyways
haha man its easy it just takes time to understand some weird mechanics
haha man its easy it just takes time to understand some weird mechanics
i can try to explain it better if that might help
i can try to explain it better if that might help
maybe if u would be so kind to like, break it down to dummy terms
Art and design is not easy either friend
I'm a ui designer and let me tell you, they are equally hard
eh i find it alot easier so- :/
it's a matter of which one you end up practicing more
true
so the first function loop's goal is to get the total weight
so the first function loop's goal is to get the total weight
weight is the chance for that specific event to occur
weight is the chance for that specific event to occur
and in the loop, it runs through the entire list, and only adds to the total weight except the lastEvent event, since we don't want to have that one occur again
are you following that part
and in the loop, it runs through the entire list, and only adds to the total weight except the lastEvent event, since we don't want to have that one occur again
are you following that part
uhhhhhh so
@mental token
ye wrapping head round it
it goes through all the events and adds to the total weight
so like
totalWeight = 0 at the beginning
then it adds +30 for fire
then lets say the last event was hardware, it skips that one.
so totalWeight at the end is 60
im sorry but could we go in dms? idk who this random person is who keeps copying your messages but its destracting me too much
l0l
l0l
he on mobile doing all of this btw
he on mobile doing all of this btw
hahahaha
hahahaha
thats wild
he cant copy as fast as i can type
hey any scripters willing to help wioth soimething
what u need friend
i need someone who can do sync for emotes
are u runinng into a specific error
wdym
are u runinng into a specific error
like
my friend has tried and we want /sync players user
??
its a emote game
you have no clue on what your saying bro
@leaden spruce were gonna let you rephrase everything you have said. Restart dawg
yea
Okay, so im making a emote game with my friends and we want it so you are able to sync other players with the power of /sync user.
oh
youd have to store the currently playing animation somewhere on the characte
then when a sync is requested from player2 with player1
on player2, play the animation and set the timeposition to the same timeposition of the animationtrack player1's character is
thank youu ill go try
local User = Arguments.User -- ( Input user as the second argument of the command )
local Player = Arguments.Player -- ( Player who called the command )
local Character = Player.Character
local UserCharacter = User.Character
local function Sync(AnimationTrack : AnimationTrack)
if not AnimationTrack then
warn("You must provide a AnimationTrack") return
end
local Name = AnimationTrack.Name
local FoundAnimation = ReplicatedStorage.Animations.Emotes:FindFirstChild(Name)
if not FoundAnimation then
warn("Missing animation", Name) return
end
local Humanoid : Humanoid = Character:FindFirstChildOfClass("Humanoid")
local Animator : Animator = Humanoid:FindFirstChildOfClass("Animator")
local TimePosition = AnimationTrack.TimePosition
local SyncedAnimation = Animator:LoadAnimation(FoundAnimation)
SyncedAnimation:Play()
SyncedAnimation.TimePosition = TimePosition
end
for _, AnimationTrack : AnimationTrack in UserCharacter.Humanoid.Animator:GetPlayingAnimationTracks()
if AnimationTrack ~= nil then
Sync(AnimationTrack)
end
end)```
might of gotten ssmth wrong since its
on discord code
but ya this should work i thinkk @leaden spruce
oh okayy tyy
you'll have to do all the other stuff urseld but this should sync up stuff
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local SyncRemote = ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("Sync")
SyncRemote.OnServerEvent:Connect(function(Player, User)
local Character = Player.Character
local UserCharacter = User.Character
local function Sync(AnimationTrack : AnimationTrack)
if not AnimationTrack then
warn("You must provide a AnimationTrack") return
end
local Name = AnimationTrack.Name
local FoundAnimation = ReplicatedStorage.Animations.Emotes:FindFirstChild(Name)
if not FoundAnimation then
warn("Missing animation", Name) return
end
local Humanoid : Humanoid = Character:FindFirstChildOfClass("Humanoid")
local Animator : Animator = Humanoid:FindFirstChildOfClass("Animator")
local TimePosition = AnimationTrack.TimePosition
local SyncedAnimation = Animator:LoadAnimation(FoundAnimation)
SyncedAnimation:Play()
SyncedAnimation.TimePosition = TimePosition
end
for _, AnimationTrack : AnimationTrack in UserCharacter.Humanoid.Animator:GetPlayingAnimationTracks() do
if AnimationTrack then
Sync(AnimationTrack)
end
end
end)```
@leaden spruce
new?
ya i fixed smth
player is always the first argument of a server event
lol
-gun system
- good anims
-bank robbery system
-police team jail system
-custom character
-job system
-etc
can someone do that for a basic hood game for 50 usd +?
wdym by
custom character
like no humanoid or starter character
Hes mean a starter character
starter character yea
can u do that for me for 50 usd?
or more than 50?
can u do it?
how do i make this rainbow text
is this code messy
I USE AI TO CODE HAHAHAHAH
just kidding
yooo
I gots a question
I finished the scripting playlist and I'm kinda stuck on what to do next
Its ez
Make spleef
that was too easy
Make a modular combat system ; )
.-.
Nah but fr just make a farming game or sum
Just make whatever you feel like making
An easy game to make
Given that you know how to make it
He doesnt know what to make wich is why he is asking us
But ig
I mean you learnt game development to make games
What games did you want to make
tbh
currently I want to make a sim first then make the games I've been thinking on making for a while
can't really make a big game by myself with little skill and no funding fr
.
who can script ai navigation like a guard which detects and patrolls lmk
dm me
no
should i be using pascal case or camel case; does it matter
how much time u spent on this
and what the fundamental that u recommend to learn before doing magic attacks + VFX
π₯
dude ragdoll works perfectly fine, except for when I jump and the game tries to ragdoll me
i think need to fall
make ur character go down
i had to add this line of code
humanoid.EvaluateStateMachine = false
not long, for the explosion skillset, i did about 1 skill a day (spent 1-2 hours on each skill), and i spent aboud 4-5 hours working on the 2 wind skills (only took so long because i wanted to perfect the dash
oh
but what are the fundamentals that u used for creating skills tho
framework
only that?
i mean , i started learn lua
a few days ago
i want to know what takes , to create a single blow
just use ur average permade framework
just make a hitbox sys, have a skill summon vfx, animations, then at sompoint, summon the hitbox
thank u
and thank you too
check out brawldev he helped me code
i'm watching him rn
hahahaha
Breaks & Continues - Roblox Beginners Scripting Tutorial #12 (2025)
rn im on this video
xD
he lowk the best yt outthere that teaches roblox
oh
ik
well explained things
me im on Vibrations - advanced scripting tutouiral
can i call a function -> inside a loop
?
guys
@everyone
please
guys how to make sure that people can't respawn like block the thing to respawn
whyd you ping me bruh
game:GetService("StarterGui"):SetCore("ResetButtonCallback", false)
startercharacterscripts
local script ?
yes
yep
thanks bri
Its this one game:GetService("StarterGui"):SetCore("ResetButtonCallback", function() end)
whtat
work
It works
ur welcome
wh at
I want to create a table of people's best score, but how do I do it? I already have the shares but the script
wdym
explain in detail pls
you cannot explain anything in detail with images
oj
that isnt an elaboration
make what
local bestTime = math.huge
-- Function to update the best time
function updateBestTime(currentTime)
if currentTime < bestTime then
bestTime = currentTime
bestTimeLabel.Text = "Best Time: " .. string.format("%.2f", bestTime)
end
end
#what the fuck im i doing
where i put ?
for A = 1, 10000 do
if A <= 1 then
print("A <= 1")
if A == 200 then
print("The A Breaked on 200")
break
end
end
end
why my script stop on print ("A <=1")
?
for A = 1, 10000 do
if A == 200 then
print("The A Breaked on 200")
break
end
if A <= 1 then
print("A <= 1")
end
end
its so obvious bro
i'm learning tho
Ok sorry
where i put ?
?
no idea but i got the script
because i dont know ur hierachy
ok mm
smh ai
ofc
ok ur my friend now
make it spawn sanduiches
aw ok
???
why the fuck do u assume its ai if i give u comments / hashes
because it looks exactly like the comments chatgpt gives lmao
fr
you even got the missing local
@gloomy kraken is this ai
what in the actual fuck is that logic
that's what a AI user would say
thats what a vibe coder would say
what items are stored in replicated storage
stuff that both the client and server need to use
like what
holy nesting bro
remote events
is it ai?
not sure, it could just be from a bad scripter
"holy nesting" (1 nest)
its my 13th day scripting bro
i aint bad
stop the nesting
bro does not know what nesting is
lowkey you could just do
if not coalTool then return end
why not do local firething = part:findfirstchild("particle") or part:WaitForchild("particle")
makes it more readable icl
It could save the if statements
do you even know what they do
but if the player needs the tool, they dont want to just not have it if it isnt loaded yet
depends on where the script is
unless its a sanity check
what is bro yapping about
what would he need waitforchild for if it checks both the character and replicated storage
the tool can still be in the character even if the assets arent loaded
coal + fire = more fire
no
theres literally so many logic errors that its not even readable
just directly enable/disable the uis inside the hierarchy π
he doesnt even need waitforchild for proximityprompt
he should learn when to use waitforchild and findfirstchild
yes. i dont know who mentioned that it should wait for the tool but it is not necessary
also the coaltool is defined twice for no reason it seems
and theres too much nesting
theres only 1 nest
do you know what nesting is
holy skid bro
pretending the fire assets were defined properly, the if statements could be necessary if they can be destroyed somehow
otherwise there would be an error if the user requests after theyre destroyed
a nest isnt bad just because its a nest
it amkes code so unreadable
that being said, no offense to the coder (unless it was an ai) but it doesnt seem like that was the intended effect
ai makes better code then me
so its not ai π
I dont really see how, if the scripter in question was aware that children of the tool could become nil then its necessary to add if statements
and people working on the script
at any rate if this was written it should include comments like any other code
@dense ruin
The coal tool could be missing children while still existing
doesn't AI write comments as well?
idk i dont use ai for code
then add more checks bruhhh
this is ai's code
-- Create a variable named "false" (this is actually a variable name, not the boolean value)
local false = false
-- Print the initial value
print("Initial value of our variable named 'false':", false)
-- Change the variable named "false" to true
false = true
-- Print the updated value
print("Updated value of our variable named 'false':", false)
-- Additional confirmation
if false == true then
print("Successfully set false to true!")
else
print("Something went wrong!")
end
HELL NO
those are the checks. as far as ive seen thats probably the best way to do it. I would personally prefer a loop after the tool is equipped to enable each particle instead of 3 if statements
NEVER USE AI AGAIN
i used ai 14 days ago bro
it looks like each part in the tool has an effect or light or something, so a loop would do fine, no need for if statements
it will also be scalable. what if later you update the tool and it has 10 particle effects
skid meeting bruh, im going back to deepwoken
- readable
e
then just add more if statements
lol
can an exploiter use a local script and then use a bindable event to communicate with a server script that's listening for a bindable event?
event is a little hard
anyone know how I can code a circle that will full up everytime I click except the cirlce is an imagelabel?
Does the edit pivot position tool effect the pivot position for scripts utilizing the part
big fire
ts pmo icl
how is it possible to make a module/local script detecting a accessory named ''banana'' for example and checks its meshes as values v1 ( Mesh named 1 ) and etc for example banana has 3 meshes v1 v2 v3 it checks the module script which mesh is toggable and pastes from a template changes the textlabel to ''3'' mesh3 v3 and when clicked makes that v3 mesh transparent 1
I need help making a script for a Hammer tool I want to use raycast or shapecast, I'm trying to get it to attach parts/models that have a "Placeable" tag without it anchoring the parts. I've gotten really close to where it attaches a part to another part, but they aren't touching, and it takes multiple clicks to get it to attach. I'm also trying to get it to snap to the part like if I attach 2 cylinders they attach on the flat side and they are lined up. I have a local script as a child of the hammer and a script in serverscriptservice. Any help is appreciated, thank you.
kinda like SSE2
does using semi-colons at the end of lines worsen performance or cause any negative side effects?
it just feels wrong to not use them after using java for so long
with modern computers the effect would be basically zero
thanks
Not neccesarily a bad thing
the only thing it effects is compile time and size of the script
and thats neglectable
and pretty much 0
it makes the script much harder to read icl
How much would a blue lock rivals type match loop cost
Not really but it depends
Its prob just me I am just used to it
Obv nesting it a lot is bad but the pic he showed doesnt really have too much
Match system with position picking
huh yeah, im used to minimal nesting so his pic just kinda tires my eyes out
someone give me something to script, take to consideration i am a beginner
Heyyy I need a scripter asap!! My main scripter ended up disappearing, and I need someone to finish his tasks(kinda simple), Iβm offering 3k robux tax included, DM me!
Srry if this isnβt the right place to post this since I canβt wait 1-2days for a hiring post to get confirmed rn
Hey! What do you need to fix exactly ?
Well itβs not really fixing, I have this rate my avatar game, and I needed my scripter to implement 4 booth skins, he already made the system and half of the skins are already added I just need someone to add the rest for me.
Also few other things like a proximity prompt Gatcha for gears/tools that makes you spent currency(currency already made).
And lastly a thing where if the player stays in the game for like 60mins they get free vip commands with the Hd admin in our game, I think I may need to go slightly more in-depth but thatβs basically all of it
I can code not build
Yo guys can you help me out please? Can you see what I can improve in this code block please?
It works but I am trying to organize it, trying to learn code organization, this is a module btw.
firstly don't need to use pairs
secondly the continue statement is redundant
alr
won't affect anything but still
thank you let me try immplement that
117: constant values should preferably be declared at the top of the script
124: pairs is useless
125: turn if statements around to avoid nesting for example: if key ~= βWoodβ then return end
127: why r u assigning a for loop value????
130: once again turn the if statement around to avoid nesting, if not check then print(β¦) return end
131 & 132: you dont need to use waitforchild since leaderstats should already be created
144: continue is useless here
also you're assigning the variable value with newdata
but isnt value the key,value pairs of material
yea 127
dang you are right
also at 116, you type annotated player so do so for items as well
can someone please make a fps game w me rq i wanna upload it to my yt
I'll show you my other part of the script π
dang the function too big I can't fit it on the snipping tool
did u fix the first one yet
nah still doing it but you say turn the if statement around without a for loop, would it still require a key? should I just get the attribute from the players character
are u trying to get the value of a certain key from a dictionary
yeah
then remove all that shit u can literally just do dictionary[βWoodβ]
the dictionary adds itself from the attributes given to the players character
or dictionary.Wood
oh alr
ayo guyz do yo have any ideas on how to make so tht it detects inappopriate avatar items?
Is this better? The table is up the top not incased inside a function, and the key is equal to a string.
how do you remove enter from a string
Nah like the key
ahh like the indent
replace \n with ""
Alr
little research str = str:gsub("[\n\r]", " ")
I know more abt python than lua now tbh
\r?
Yeah that didnt work cus it removed spaces
actually
NVM
It worked
thanks
are links banned here?
Why do you have a function called checkMaterial that listens to changes instead of checking the material?
pretty sure it checks if its hit the limit
Thought it would be better to put it inside a seperate function
I need to change the value passed through though
The name is misleading
But since it's a function, is it possible you're calling it later after the change occurred?
since it can't listen to changes that already happened
fair point, I used it to free up space inside the function
It will only be connected to the materialCheck() function
i have added some face culling to the test player object
dang your talented
Just wondering what do you use to record
the windows snipping tool
IT RECORDS???
π
I always thought it could only screenshot
yes
sob
there is a record icon near the image one
Yeah I just never realised lol
me too lol
It works with easy to understand code! God bless!
Is there anyway to organize this? I have 2 parts
organize what
your colors are so different from mine it hurts my brain but
I like to put big big comment lines with labels of what each section handles
you could compress this by a single loop
example
compress?
the lines will go all the way down
Oh alr
yes make it look cleaner
just something I do personally though, everyone has their own knicks
for i,v in {"wood","stone","pickaxe"} do
local Value = Instance.new("IntValue")
blah blah
end
same for setting the value
but make the table at the top
Why's it a dictionary
should it be an array?
no
dictionary doesn't make any sense here
ur key and value r the same
Yeah
fair
u r better off with just value
to each their own i guess, i prefer that so I can just add another one whenever I want if I need to
I mean it doesn't hurt your code it's just pointless
i was jk , adding table is def better for readability
{"Wood","Stone etc works just as well
alr
some of the parents are different though, the backpack is to the plr while the rest are to the leaderstats, so maybe a dictionary with the parent might be better
let me change it real quick
all depends on preference tbh
yea then that would be better @tropic sequoia
change ur value parent or an array containing parent so u accomdate any other stuffs if u need
Yeah
they're key to value based, each key can't be the same and holds a value
so if you need 1 value for each key a basic dictionary is what you use
you can nest dictionaries and arrays if you need more
alr cool, let me change some stuff real quick
a
How do I use next(), is it depricated?
next is not deprecated
and when u use pairs u are already using next behind the scenes
Introduction Hello I am dand, a 2 year lua programmer and this is just a small guide to hopefully explain next to beginners and people who donβt even know it existed. next is a builtin function used to give functionality to pairs (not ipairs) and allows us to loop through dictionaries easily. Simple terms next returns the a tuple of the ne...
its pretty simple
this forum summarises it well
alr thanks
next returns a tuple which is the key and the value of the array u passed it, and the index u want to look at
can someone help me with cframes?
how to make my curve be in the correct way
confusing, is it just a manual for loop that will pass through a dictionary but you'll have to call next again
it will give you an index if you call next(dictionary, nil)
rather than the value it passes through after
Bazier curve
anyone knows a way to detatch the player head from torso without it killing him ?
how i can learn findfirstchild more easily
wym
it just finds the first child of the name you give
of whatever you're using it on
guys how to fix the fact that TS looks very laggy? I already tried to do it through heartbeat and it also was laggy. I made a separate part in workspace and added there a random script with TS and on this part TS worked normally
is there a way to increase ur max FPS in studio gang
i need to run some tests with my raycasts and it sucks having to publish and go to the main game
buy new pc
is there any way to change a player's rank in a group via a script?
Is there a way to make my Billboardgui tween Vertically? like from Top shrinking to bottom, I had to rotate my gui for it to be vertically and when I tried to make it shrink with TweenSize it just keep tweening Horizontal? (This is not scripting issue, seems like to be Billboard gui issue)
i like this theme can you send me the entire script editor
who wanna join my stay alive kinda game must be a scripta
how do i make a backpack gui using topbarplus
you need to make bot
use anchorpoints
UI will always move and resize relative to anchorpoints position
idk
fyi it is a property
put quality level to 01 and mesh quality to level 01 in rendering
thanks guys
nah it was that it was capped at 60
additionally you can put lighting mode to shadowmap/voxel for performance and also use opengl lighting engine in settings (you will have to restart for changes)
anyone have any ideas what other settings my gun system might need?
i cant think of anything and im kind of a spaghetti coder, so any ideas now would be much appreciated!!
local Player = game.Players.LocalPlayer
return {
type = 'assault'; -- shotgun, sniper, or assault
firemode = 'auto'; -- auto or semi
teamkill = false;
zoom = false;
--SETUP FOR CLASSES
shotgunAmmo = 0;
sniperChargeDMG = 105;
--GENERAL SETUP
spread = .055;
range = 100000;
rate = .085;
reloadTime = 1.5;
maxAmmo = 40;
--DAMAGE SETUP
damage = {
head = 12;
torso = 11;
arms = 10;
legs = 10;
};
--ANIMATIONS SETUP
animations = {
idle = 98964021294565 ;
fire = 108079084773190;
sprint = 124930052163789;
reload = 108092244094481;
equip = 122881089780445;
};
--RAYCAST SETUP
ray = {
material = Enum.Material.Neon;
brickColor = Player.TeamColor; -- So that the team colour is the ray colour
size = 0.15;
};
}
well for top to bottom resizing it should be at .5, 1
Alright!
bullet speed and recoil
π
The value isn't updating even though it is a server module
i couldn't post it
cuz it reached the discord message limit
so i had to make it a .txt
what would recoil affect? ty good ideas
recoil of the gun, like jumpiness or camera displacement or whatever
idk how to make recoil π€·ββοΈ
from what i have seen its just a lerp on camera properties
how do i make this script not look messy (repost with image)
seems not too difficult
thanks dude
thanks
more comments and use of sections (section for services, variables, constants, private, public, etc for organisation), less nesting with if statements, use modulescripts, why u got a while true loop????, and dont use deprecated functions (wait instead of task.wait)
How do i learn to script
how do i do this
do what
just google
this is the real answer
can't
Are module scripts crucial when making a game?
no they are not absolutely necessary but they are good for organisation and future updating
How would I get the max number of the table without using table.maxn()?
Because the key values keeps on returning 0
dm me if ur a scripter and u wanna partner w me to make a sword fighting game i alr have a small community
I think the problem is you're asking if attributes (list of character attributes) is a certain attribute in the if statement. Try doing a loop instead and see if the value in the loop is the same as the attribute youre looking for
I found the issue but thanks for the help
π
solved with this
dm me if ur a scripter and ur interested in making a steal time / flex your time game i do ui + vfx
& sword model
no thats perfect, i like it when my rays DONT RENDER and my cursor DOESNT RLLY WORK
the modules r too long to send here bro idk what to do
coal
1111/100
Hello, can anyone who is good at pricing stuff contact me, I have a question regarding a certain task
