#code-discussion
1 messages · Page 116 of 1
what about the output?
it says nothing
oh
wait it works now
i just restarted my game
hope you now your a life saver
I think it doesn't pass if ... then
Print the chil var
Alright I'll try
The "if child:IsA("Tool") or child:IsA("ForceField") then"?
or "if character:FindFirstChild("ForceField") then"
You should try print(child) first
actually, does the spawner give forcefield when spawn or it never give forcefield from the beginning
It should give you a forcefield when you spawn
If forcefield duration is 0 then there won't be any forcefield
so most parts in my game have the 'grid' texture and i feel like its bad for performance, are there any ways i can make it better for performance
More parts and unionoperation can make the game laggy. Can use mesh
can anybody explain why this dosent work? ```local players = game:GetService("Players")
local badgeservice = game:GetService("BadgeService")
local textlabel = script.Parent
local badgeid = 716343469755606
local function checkforbadge(player)
local success, hasbadge = pcall(function()
return badgeservice:UserHasBadgeAsync(player.UserId, badgeid)
end)
if success and hasbadge then
script.Parent.Text = "yes"
end
end
checkforbadge()```
Where are these properties located?
Teams
i dont think u can do it on the client
only the server
so you would have to fire a remote event
before you say "checkforbadge()" make a line above that and add "local function checkforbadge(player)"
you didnt give the function a player instance
that's why
yea exactly
the function needs a player
argument missing
I meant like, I have the properties tab open, but where are the properties you showed me? like are they in Teams or workspace Spawn Location?
spawn location
bro everytime i right click on studio it gives me these
when i hold it down to try and look around
its pissing me off so much
lol
Yea bro thats so annoying
wdym IsA("Tool")???
We are a commission server so you can't buy or sell stuff here 👍
So like It's looking to see if the player has a tool in there invertory
invetory
If they have a tool, which will be the gun or weapon, they force field gets destroyed
the forcefield is beeing remouved by roblox automaticly so why task.wait(10)?
gummy bears
Who wanted to sell things?
Oh wait i meant it's giving a force field to the player and then when it detects a tool it calls to the function "destroyForceField" to destroy it
I did wait 10 because it was killing me so i tested if 10 would fix it but it didnt, 1 will be the wait time
yea but after 10 seconds its remouved by roblox, why remouve it with a script?
?
are you talking about roblox's defualt forcefield system?
when you spawn, roblox give you a force field and roblox remouve it after 10 seconds, my question is why are you deleting it when roblox already doest it for you?
Well before i posted it i didn't that you could easily edit the FF through the spawn locations properties
Best way is to follow scripting tutorials and then make small projects. At the end you will master them at the same time because one needs the other most of the times.
how to fix this
Fix the modulescript
Your module script is having an error
but how do i fix this
Idk that’s not enough information
Why don’t you just copy paste the code into chatgpt
Also this is for discussion of code not for helping with code. If you want help debugging then you should go to #code-help
I think code help is a bit off topic rn
Cause he wants to learn
That’s exactly how you learn
Besides debugging isn’t learning lol
chat gpt js be spouting nonsense
It instantly writing the code makes u learn so much
He’s looking to just fix some silly error rq, not write a new code.
how does games that have more than 1 experience (say blox fruits for example) transfer the same data between the experiences
There's a service for thT
which one?
every place instances
but i don't think it shares the data
then supposedly i just call the datastore like how i normally would in the new experience, right? (with the same name)
Ye
who can help me fix this
unrelated question - how much would you guys personally pay for a fully built and working, ready to use landing page which acctually looks good.
put .Value in profile.Data.Units[chosenUnit]
Hey guys i need help yk how like games in line games where players move from one tile to another how do i do that but i lock the player's ability to move because when using :moveTo i would need to make the players walkspeed back to 16 then but when i do that i give the player ability to move using their keyboard/joystick os how do i use the :moveto but stop the player from using their movement
Humanoid:MoveTo(RootPart.Position)
plr.DevComputerMovementMode = Enum.DevComputerMovementMode.Scriptable
plr.DevTouchMovementMode = Enum.DevTouchMovementMode.Scriptable
to enable control again :
plr.DevComputerMovementMode = Enum.DevComputerMovementMode.UserChoice
plr.DevTouchMovementMode = Enum.DevTouchMovementMode.UserChoice
just this? do i need to add anything? ive never used this input before
other than making variables for plr, Humanoid, etc no
alright thank you so much ill try it out
anytime! i'll be waiting to hear the result
i use it personally in my treasure capture system
along with freezing the RP but you wouldn't need that
oo nice so basically what it does it allows the character to move but doesnt take the player input?
would that mean i won't need to put the walkspeed back to 0?
ooo thats good i wanted it like that
thanks you it works!
anytime, if you need any help mention me and i'll do my best to help
means theres no Profile index in the dataManager
ty
anybody know why this happens (ive switched from windows 10 to windows 11)
have you tried reinstalling roblox studio
real one lisen to lil tecca 🔥
low internet, dont worry man
then why do other things open but not that?
alright
something has gotten corrupted
most likely cause ive deleted alot from my downloads
Oh now that I take a closer look at it that could also be a problem
idk how you managed to do that though
yeah
i think thats the problem
oh it loaded a little but then died
if you can makke the same path
and make the same file name
with hopes and dreams it should hopefully work
Squid game
boys i need to ask smth about datastore, if i fail to load data on entry (maybe table of items) and i save on playerleaving will it overwrite my previous inventory to basically nothing?
can somebody help when u click a part the game will remove item from your inventory
i didint understand what am i doing wrong
im kinda new to scripting
Could be in your charachter already
Its only in your backpack if you dont have it equipped
yeah check if its in the character first then player
okay
instead of click its i think the player who clicked it
(localplayer) is not a good syntax
yeah if its failed/empty it will just overwrite the old data with the new
the connected function parameter click is actually the player i think,
it would just be
script.Parent.ClickDetector.MouseClick:Connect(function(player)
if player then
--destroy keycard
end
end)
oh my god soooo scaryyyy
so like this?
script.Parent.ClickDetector.MouseClick:Connect(function(plr)
if plr then
local Keycard = plr.Backpack.Tool
if Keycard then
Keycard:Destroy()
end
end
end)
yeah it should work
is there a way to prevent saving nil or just add like an if statement for those values to not save them if they = nil
yeah use a if statement
alr well updateasync is a little better at least it prevents overwriting, just doesnt prevent writing nil
yeah, it just throws an error instead
or you could go through mnaually a table, if something is null just skip interly
nah it didint worked
did it error
no
@somber vault
is the tool equipped when you remove it?
just try this and see what it prints
print("clicked")
if plr then
print("player exists")
local Keycard = plr.Backpack.Tool
if Keycard then
print("keycard exists")
Keycard:Destroy()
print("keycard destroyed")
end
end
end)
oh yeah then you would have to do player.character.Tool
exactly
what was it
the code was in a localscript
would it not still work
I'll do better next time
wait why doesnt it work on localscript
i understand it now why i have to use normal script instead of local but its hard to explain
it works in local?
game.Workspace.Part.ClickDetector.MouseClick:Connect(function(plr)
print("Clicked")
end)
that's the whole code
yh but can u delete a item from your inventory?
lemme try
i dont know why my studio doesnt have it but it looks like this
under script properties
oh wait u have to make a normal script
and then set the run context to client
where did u put the script under
StarterCharacterScripts
it doesn't work under the part though
probably they removed it again in the new update?
i figured it out
local scripts run automatically inside starterplayer and startercharacter
but if u put it under a part or something it doesnt run
local hum = char and char:FindFirstChildOfClass("Humanoid")
local root = char and char:FindFirstChild("HumanoidRootPart")
if hum and root then
local colorStr = tostring(survivorChoiceValue.Value)
for _, spot in ipairs(workspace.Spots:GetChildren()) do
if spot:IsA("BasePart") and spot.Name == colorStr .. "Spot" then
hum:MoveTo(spot.Position)
hum.MoveToFinished:Wait()
local finalCFrame = CFrame.new(spot.Position + Vector3.new(0, 2, 0)) * CFrame.Angles(0, math.rad(90), 0)
char:PivotTo(finalCFrame)
print(currentSurvivor.Name .. " walked to " .. colorStr)
end
end
end
is there a reason why there is like a little delay before the move is done
u can instead create a normal script
and GUIs as well
yes
hum.MoveToFinished:Wait()
i dont know why u cant set the run context on local scripts
yea but before that it doesn't even move it js waits then immediately does the pivot
i don't see anything that delays the script but i'll try doing a modification
local hum = char:FindFirstChild("Humanoid")
local root = char:FindFirstChild("HumanoidRootPart")
if hum and root then
local colorStr = tostring(survivorChoiceValue.Value)
for _, spot in pairs(workspace.Spots:GetChildren()) do
if spot:IsA("BasePart") and spot.Name == colorStr .. "Spot" then
hum:MoveTo(spot.Position)
hum.MoveToFinished:Wait()
local finalCFrame = CFrame.new(spot.Position + Vector3.new(0, 2, 0)) * CFrame.Angles(0, math.rad(90), 0)
char:PivotTo(finalCFrame)
print(currentSurvivor.Name .. " walked to " .. colorStr)
end
end
end
give this a shot
still does the same and it does'nt seem to be running a moveto
but ill have to check if i had paused the walkspeed
good idea
print spot.position everytime and if its changing properly then the problem is with ur humanoid
Wdym
even if it's static the humanoid should respond
unless the spot's position is the same as the player's
yea it was because i forgot to change the walkspeed
anyways thank you!
nice catch!
don't thank me, i did nothing
you did try to help and it did take you time so you deserve one!
thank you too!
i really appreciate it man! just doing what i love.
np
for some reason it doesn't work for me
maybe has to be subplaces
it doesn't send the data that i have but rather sends a completely new one
it is. if i created it correctly
wdym send
I'm building a round based game that requires the players to be teleported to another experience
i'm trying to send the data from the main experience to the round experience
not place?
couldnt you just use getasync
doesn't work
whattt it should work as long as its under one experience
no, experiences
you could transfer those specific players' data with TeleportService probably
okay, i'll go over how i create sub-experiences
or whatever it was called
no
?
you can send values as well
ANY PRO SCRIPTERS HELLO
hmm, i might try something
is that launchdata or is that something different
i won't consider myself pro but if you have an issue go ahead and send it
Lf scripter company
my idea right now is to use TeleportService:TeleportAsync and send a table with the players' userids that contain their data
-- Server
local teleportOptions = Instance.new("TeleportOptions")
local teleportData = {
-- table with key/value pairs of userids and their data
}
teleportOptions:SetTeleportData(teleportData)
TeleportService:TeleportAsync(game.PlaceId, {player}, teleportOptions)
i modified this code slighly from the roblox documentation
dont mind that it is called {player} i forgot to change that
that could be an array of the players you want to send
i found a solution
?
--game 1 server script
game:GetService("TeleportService"):Teleport(GAME_ID, plr, TABLE)
--game 2 local script
local TS = game:GetService("TeleportService")
local plrdata = TS:GetLocalPlayerTeleportData()
local ValuesData = plrdata.Value
--fire the value
isnt that easily exploitable though
im assuming you are firing the value to the server from the localscript
@somber vault
indeed, but i don't think they'll be able to find the values names except if an error message popped up
and i can cover that
still risky probably
just handle it from the server
the entire process
Guys
I learnt like all of the basic stuff for lua
How do I now go onto writing full frameworks in a good manner
Or just overall improving the quality
but how am i going to catch the data
if it's only for client
Vaaseo mind guiding me pls?
okay so, all i have to say is start with simple stuff
such as flag capturing system, etc
once you're done with that level it up a notch
by making a level system for example
pretty sure you can do Player:GetJoinData().TeleportData
from the server
Well I can do all those
It’s just I can’t write good quality of code
Like my code seems makeshifts
And less optimised
Wanna improve on that
organize everything into module scripts
Any specific code structure the pros follow?
some ppl write all their code in module scripts and then just have one server script and one local script thats initiates those modules
i personally use module scripts for repetitive functions.
or you can organize you code into modules in replicated storage, organize ur server scripts into serverscriptservice, and then organize local scripts in starter player and have the bulk of ur code in modules
I see
And about code optimisation do u need to learn use of actors?
@drifting agate @somber vault
under certain scenarios they are useful
wdym by optimization like fps wise?
i don't use it
Like writhing best quality of code
So that includes decreasing loops
And heavy load functions
send an example of your code so people can point out areas that could be improved
Alr could u like give me some small easy task?
u can make ur code as modular as possible, that increases its quality
Mhm
just send something you wrote previously
if your code performs heavyish computation that'd benefit from getting split into multiple parallel scripts then you'd benefit
can probably avoid it in most cases, as you'd only want to use it whwen the speed benefits outweighs the increased overhead
Also do I use Roblox scripting system? Or do I use rust and shit
Mhm
i have to admit idk if this is 100% exploit proof tho
Soon u might not wanna worry
About exploits
A new script is coming
nothing is 100% exploit proof
yet
what we ta;=lking abt
Helping me get better at scripting
giving optimization tips mostly
yeah but my opinion is that you should do it from the server
how ton are we talking
and of course their result cause performance issues
if they're too many
Mhm
How do u go about making a climbing system then?
i use a loop which is even worse
Oh yuh using run service would be better
Alr bet
task.spawn(function()
local con
con = game:GetService("RunService").Heartbeat:Connect(function()
if StopIT == false then
local hitbox = game.Workspace:GetPartBoundsInBox(base.CFrame, Vector3.new(8, 8, 20))
for _, char in pairs(hitbox) do
if SCRH.IsAPartOfChar(char) and not Climbing[SCRH.IsAPartOfChar(char)] then
Climbing[SCRH.IsAPartOfChar(char)] = true
if SCRH.IsAPartOfChar(char):FindFirstChild("Humanoid") then
--do the rest of the code
end
end
end
else
con:Disconnect()
con = nil
return
end
end)
end)
why task.spawn
guys is there a way to SYNC roblox studio scripts into rojo
it's a part of a whole entire movest system so i use this to not inflict with the rest of the code
wdym not inflict it
rojo settings
two way sync (experimental)
the system has loops, etc. so i set every loop inside of a task.spawn to not delay/inflict with the other loop
even though runservice doesn't need one but i just put it there
forgot to remove it
Btw rojo better than Roblox scripting?
What are the advantage’s
indeed, it was old
depends
Hm
hi chat
boils down to whether you like it more or not lol
external editors generally have better plugins and support tools like darklua etc
dependson the developer
roblox supports VSC now
officially, i dunno if it's still beta or not
what like an official integration plugin or somethin
since when
havent seen that
alright ill see
found out how, we're talking about syncing roblox studio script to VSC right?
right click a script, select Sync to Disk...
rename the script to whatever you like
🎮 Roblox Full Game Developer - Efkan 🇹🇷
I develop full simulator/pvp/tycoon games from scratch inside Roblox Studio
and deliver them as a complete .rblx file.
While I don’t have a public showcase yet, I can build anything from UI to scripting to systems.
💰 Affordable | ⚡ Fast delivery | 💬 DM open for commissions!
start modifying on VSC, the changes will be applied to roblox and vice versa, the script should have arrows like this
@hexed zinc
oh u mean sending every studio code to rojo
yeah
rojo has a two way sync option
is it possible
tho its supposedly experimental
theres a rblxtorojo exe linked in the rojo documentation
hmmm
how does it handle nested scripts
ye im sticking to rojo 😭
i don't use it to be honest, i just know it exists
just applied it now for showcase
Thnx for help all
and there are these options when syncing
u gotta do each script manually?
yeah.
damn that would be annoying
cant believe i turned this chat into rojo
or you can select multiple scripts but it will save them
ah
i just knew it
like right now ;-;
😂
me when i had 3 month experience and tried to sync rojo to game and did so badly
never organize your codes like this
stash all into a folder
my old game's organization
i was terrible at organizing
and i don't want to even mention the replicated storage
ABSLOUTE MESS
thank god that i started a new project and learned to organize my stuff a while ago
that was like 1.5 years ago or something, back when i started my first actual project instead of messing around
Hello guys, since I'm new to scripting (I only know basics) I have question. I started from tycoon to learn smth new and improve skills. Should I put script inside each button (when pressed it will buy droppers etc) ?
no
preferably make a server script that controls all buttons
better, optimized, easy to modify
Make 1 script that controls all buttons and put it in ServerServiceScript
Okay, so basically put IntValue inside each button (for price) and control everything in ServerScriptService ?
you can just set each price inside of the script as a variable
but you can also do that
I can put prices in module script and then use require in serverscript, right?
and buttons order in module script too?
yep
even though you can as well put it in the server script but you can put it in the module as well
I think module is better, because it's gonna take space in serverscript
a general tip, try to reduce as much instances in your game as you can
module looks more ogranized
you're absolutely correct
you can run your entire game with just modules and then 1 script to initialize them
like. any useless part you can make it only render when your camera is facing it. etc
there is already occlusion culling
yeah but i think multiple modules for multiple purposes
they released it?!
yes obv
i believe so yes
SINCE WHEN
If there're many game initialize modules then can use module loader for the intialize one
a few months ago if i am not mistaken
need a scripter for a company dm
just loop through the modules and require them and make initialize function for each of them
ye
oh i didn't enable it
Okay, another question. If I have more than two plots, how can I check which tycoon the player is trying to buy something from, and then clone the item from the correct plot in ServerStorage?
I can make different scripts as well, but it's easier to control everything in one script ig
you can get the parent of the touched tycoon part and then clone the stuff there
Need to use some value to tell which owner of that plot or can just use team (like blue team, red team, etc . . .)
you're talking about the property part or the tycoon part itself
What if I make folder inside workspace and put string values there for each plot and then just check from which plot function is called?
tycoon part
would cause performance issue
make teams then?
teams would be great yeah
and you can also check the touched part's parent from the server and submit that character as the owner
in a table
and make sure that a table called HasOwnedATycoon[character] ~= true or something
or you can use the first table and make a condition stating that the character must not be listed already
Guys, how much robux should A scripter get if he scripted a game very very similar to grow a garden, like almost the same thing
And the scripts are very very good
local plot = game.Workspace.Plots.Capuchino
local claimPart = plot.Entrance.ClaimCapuchino
local owner = plot.Owner
local capuchinoTycoonStorage = game.ServerStorage.Capuchino
local debounce = false
claimPart.Touched:Connect(function(hit)
if debounce then return end
debounce = true
local character = hit.Parent
if not character then debounce = false return end
local player = game.Players:GetPlayerFromCharacter(character)
if not player then debounce = false return end
if owner.Value ~= "" then
warn("Capuchino Tycoon already claimed")
return
end
owner.Value = player.Name
print("Tycoon was claimed by", player)
local capuchinoTeam = game.Teams.CapuchinoTeam
if player.Name == owner.Value then
player.Team = capuchinoTeam
end
local firstConveyor = capuchinoTycoonStorage.Buttons.Conveyor
firstConveyor.Parent = plot.FirstFloor
end)
Why it's not assigning team?
back
i feel like zim
what is Owner
what type of value
object, string?
string
btw that statement is useless
if player.Name == owner.Value then
player.Team = capuchinoTeam
end
because the script will return if the owner isn't nil
and 1 major issue
is that hit.parent could be ANYTHING
i'll give you a module script i made to check if it's an actual character or not
local module = {}
function module.IsAPartOfSpecificChar(part, char)
local parent = part.Parent
while parent and parent.Parent do
if parent:FindFirstChild("Humanoid") and parent == char then
return parent
end
parent = parent.Parent
end
return false
end
function module.IsAPartOfChar(part)
local parent = part.Parent
while parent and parent.Parent do
if parent:FindFirstChild("Humanoid") and parent:GetAttribute("Player") == true then
return parent
end
parent = parent.Parent
end
return false
end
return module
try it with these changes and let's hope that your problem gets fixed, as my prime suspect is the game considering any part with a parent an owner
practice
how long did it take ya'll to become fluent?
I have an item that I want to place inside of a box, but I have to open the box so that the prompt to hide the item shows up
currently I need a way to turn on the UI after the box is opened and the player has the item, if the player opens the box and THEN gets the item, the ui doesnt enable because the script to enable it only runs when you open/close the box
I need a way to constantly check if the player has that item and if the box is opened.
i'm sorry but i don't quite get it, can you explain it in more details?
time.
yo
you need time and patience
can anyone help me make abilities
hello there sir
hello there
yeah of course
tell me what do you want to make
tysm man
<3 anytime!
just simple abilities i dont want complex can i tell u in dms?
sure
alright
it returns end if it's not
i just noticed it, you can also try removing this statement and adding a print
see if it changed
it prints, but team not assigning
server script yes?
7 months
ye
i find it easier to learn other coding languages thanks to lua
Can you do print() in a module script right?
If I try to use player.Team = game.Teams["CapuchinoTeam"] it's assigning this team on join
without the variable?
no your computer will crash and you'll have to reinstall os
stop typing to me
local plot = game.Workspace.Plots.Capuchino
local claimPart = plot.Entrance.ClaimCapuchino
local owner = plot.Owner
local capuchinoTycoonStorage = game.ServerStorage.Capuchino
local debounce = false
claimPart.Touched:Connect(function(hit)
if debounce then return end
debounce = true
local character = hit.Parent
if not character then debounce = false return end
local player = game.Players:GetPlayerFromCharacter(character)
if not player then debounce = false return end
if owner.Value ~= "" then
warn("Capuchino Tycoon already claimed")
return
end
owner.Value = player.Name
print("Tycoon was claimed by", player)
player.Team = game.Teams["CapuchinoTeam"]
print("Team assigned")
local firstConveyor = capuchinoTycoonStorage.Buttons.Conveyor
firstConveyor.Parent = plot.FirstFloor
end)
upon join yes?
ye
local character = hit.Parent:FindFirstChild("Humanoid")
still assigning team on join
okay, i'll try to replicate that effect on my game
what is the problem
rename DataManager2 to DataManager in the explorer maybe 😨
are the DataManager and DataManager2 requiring eachother?
if so then thats your problem
they're requiring recursively
Chat I just found the answer horray
so?
where do you see the other dataManager 2
in your output
so what did you say i should do
anyone got some cool suggestions for features i should add to a security discord bot?
or features i should attempt to add
can you show the top of the output?
the errors are usually above
how do people learn to make stuff with alot of math like A* or Terrain Gen, i usually just copy other examples or code in diff langs and implement it in luau
here you go
theres ur error bro
yeah thanks
im new so still learning thanks for hgelping
add colon
yeah just did thanks
just delete everything and restart at this point
does anybody remember the function that generates random characters?
there's a f*cking red line wdym ?
yeah but then you fix the problem not restart??
I suggest learning the basics first
yeah i understand that but i like learning while making a game
very bad idea
learn theory and practice then you actually know how to make games
mby but then il have fun while i do it and besides the game im making is just for fun
local plot = game.Workspace.Plots.Capuchino
local claimPart = plot.Entrance.ClaimCapuchino
local owner = plot.Owner
local capuchinoTycoonStorage = game.ServerStorage.Capuchino
local debounce = false
claimPart.Touched:Connect(function(hit)
if debounce then return end
debounce = true
local character = hit.Parent
if not character then debounce = false return end
local player = game.Players:GetPlayerFromCharacter(character)
if not player then debounce = false return end
if owner.Value ~= "" then
warn("Capuchino Tycoon already claimed")
return
end
owner.Value = player.Name
print("Tycoon was claimed by", player)
player.Team = game.Teams["CapuchinoTeam"]
print("Team assigned")
local firstConveyor = capuchinoTycoonStorage.Buttons.Conveyor
firstConveyor.Parent = plot.FirstFloor
end)
Why it's assigning CapuchinoTeam on player join?
helping you would result in another brainrot game published 🥀
Math.random
Or weighted chance tables
Either work
There is probably another script assigning the team on join
U don’t actually check if hit.parent is a character
Hit.Parent:FindFirstChild(“HumanoidRootPart”) I think i havent used it in a while
accept it that roblox filled with kids
nah, there's no other scripts that assigning team
Not like the frontpage contains 95% brainrot games already
alr imm help you
debounce is never set to false
your character variable is hit.Parent
claimPart.Touched:Connect(function(hit)
if debounce then return end
debounce = true
local character = hit.Parent
if not character then debounce = false return end
local player = game.Players:GetPlayerFromCharacter(character)
if not player then debounce = false return end
if owner.Value ~= "" then
warn("Capuchino Tycoon already claimed")
debounce = false -- don't forget this
return
end
owner.Value = player.Name
print("Tycoon was claimed by", player)
player.Team = game.Teams["CapuchinoTeam"]
print("Team assigned")
local firstConveyor = capuchinoTycoonStorage.Buttons.Conveyor
firstConveyor.Parent = plot.FirstFloor
debounce = false
end)
thats not it
it is
it returns end if it's not character
dude
try the code i gave you
just because you named the variable "character" doesnt mean its always going to be a character
what youre doing is
alr then add this lil piece of code for verification if not hit.Parent:FindFurstChild("Humanoid") then return end
imma touch you instead
hit.Parent could be workspace which isnt nil
no bro anchored parts cant touch eachother
i gave the solution here
Guys how much should the charge be to fix a knife that has been made entirely in local script s
5 sand dollars

why is my local Workspace = game:GetService("Workspace")
not blue like the tutorial im following
tutorial had an older version of studio
probably
oh
because there is a shortcut for game.Workspace - "workspace" and before it was "Workspace"
oh
in the tutorial after ive done that code i just send a picture of goes into lighting but i cant see the blur do you know why?
you have to add it yourself
:3
okay but he's is called blur mine is called blur effect does it make a difference?
no
okay good
me
I need someone to make me a minecraft clone game
Or someone who can script the minecarts so it works like how it do in minecraft
Minekanft
i already have that made
one of my many projects was a minecraft-like game
@potent maple i'm really sorry for the delay
i tried it and it worked
Np brother take your time
local plot = game.Workspace.Plots.Capuchino
local claimPart = plot.Entrance.ClaimCapuchino
local owner = plot.Owner
--local capuchinoTycoonStorage = game.ServerStorage.Capuchino
local debounce = false
claimPart.Touched:Connect(function(hit)
if debounce then return end
debounce = true
local character = hit.Parent
if not character then debounce = false return end
local player = game.Players:GetPlayerFromCharacter(character)
if not player then debounce = false return end
if owner.Value ~= "" then
warn("Capuchino Tycoon already claimed")
return
end
owner.Value = player.Name
print("Tycoon was claimed by", player)
player.Team = game.Teams["CapuchinoTeam"]
print("Team assigned")
--local firstConveyor = capuchinoTycoonStorage.Buttons.Conveyor
--firstConveyor.Parent = plot.FirstFloor
end)
did you set the CapuchinoTeam to auto-assignable?
his script checks if that "character" has a player
so it's actually valid
nothing
It's like 500 lines of code
has an M1 system?
Throw an d everythign main problem is it's completely local so others can't see it
ik what client side is ;-;
so how much
it is actually NOT diffcult at all
Would have to connect everything
i can use 1-2 remote events and that's it
how much u think
animation in local
damage in server
welding + cloning + movement in server as well
free
Aight can u do it for me
as the work is already done. you just gotta transfer it and change the only client variables if there's any
sure. dm
as i said before, you can say what you want or make a scripter-hiring request
The problem was that I had another team called unclaimed that was autoassignable
:AcquireOffspring() 👹
I WANNA KILL MY SELF BRO, DO NOT EVER MAKE A PROFILESTORE EVER AGAIN DAWG
some values are there but i cant get thel or its fucking broken
why tf is all that shi running on heartbeat
nah its only one piece of code, dont worry its the most optimized code
its consentence, 99% of it doest run, its for safety
just make your own datastore
profilestore just bloat
and that snippet alone looks like a crime against humanity
i m making a huge modular one for all my games
why huge
handles everything
i also have a Channel Module that i made that redifines all communications
wtf
i have my own which handles most things (i just need to add more ordered datastore support) and its only 360 lines
whats so chocking? is it because its stupid?
yeah
seems kind of bloated
and maybe pointless
its not that deep to make chat system
unless you are adding some new functionalities and channels and stuff
i do alot of verification client, server, i just have to require the module and check, the modules returns a callback itself, saves time
i m not making a remoteEvent everytime i do somthing
?
thats how i fire it, with only one function and no stress
oh wait you mean communication as in remotes?
yea, i can fire anything without making alot of remotes for nothing
ohhh yes i understand
can it returns a callback
i thought u meant chat system
let me give you an example
lol haha no
no i understand now
yeah i have similiar project
just use dss you dumbass
this is bindableEvent
to centralize all server/client communication
exacly, Channel Module
i can give it to you, its made with love, i even put a documentation and a tutorial on
its 250 lines and readable
still
i dont want to use someone else’s code
i kid you not i have literally never used a free module/toolbox module
i have only looked at their source code for curiosity
same, its scary
i m making a build battle game and my only local script is this
handle all my game
still working on it
i'm willing to put up with the bloat to avoid technical debt on my end and spending too much time focusing on things that are redundant
it's scary to use somebody else's code but it's scarier to write it yourself and have that burden be put 100% on you
especially when it comes to things that aren't as cut-and-dry
its better to have a burden on yourself once than to use some skidded shit that runs terribly and is horribly bloated with a bunch of bullshit
or code that is completely illegible that cannot be maintained
have u seen some of these signal modules
thats why i program in OOP
they are tryna compete with assembly legibility or some shit
that's a good example actually because most signal modules are pointless imo
they are not pointless but a lot of them are just made horribly
hey could I test out that project?
custom signals are actually faster and have better support than roblox signals
way better than having bindable event
@static coral they have their use cases but i find myself trying to steer away for two main reasons
- they're usually bloated
- there's 1,000 of them
thats why i made my own
the bloat is usually justified in the case of signal modules becuase they're always going to be faster than a bindable
but the latter is what kills it for me
like, go to the devforum and ctrl + f "signal" and you'll find probably over 2 dozen modules all claiming to be the fastest
and all of their benchmarks are against other different signal modules
i'll be DM'ing you tomorrow about the project
yeah i think some of these signal modules might be more sped than skid
for me one of the only projects that i use extensively is bytenet for networking just becuase i like it, i know how it works, and i've been using it for a while
looking to create a game with somebody.
alr
i literally have an entire game that is just a library for the modules i made for myself
whenever i make new project i can just paste all of them in
i mostly tend to do the same thing but in the end i usually just chop half of it out anyways
usually because i'm just not using most of it
and it's burning a hole in either serverscriptservice or repstorage
i just put the necessary things
i do some strange things so i often need unique functions or just weird shit in general so im always busy making utilities for myself
I dont have an idea for a small coding project to do to start my portfolio up, any ideas? not too complicated but not baby level
Is here people from Poland?
Ja jest mezchezna
give me something cool to make, because im a new dev and i wanna learn!
things made :
1 - CountdownGUI
2 - Player Info
is there any way to not have hitboxes be insanely delayed? im making a dash thing with hitboxes and the hitboxes are a good 7 studs behind you when they generate.
its ur code issue ig
guys I became advanced in luau 7 months
yo i get this error that i need to implement before run hook for security reasons in order for the commands to run i am using the cmdr module how to fix, i do have this module script inside SSS.Cmdr.Hooks.Permissions:
return function(registry)
registry:RegisterHook("BeforeRun", function(context)
local executor = context.Executor
local userId = executor.UserId
local groupId = 35920492
local minRank = 254
local isAdmin =
userId == game.CreatorId or
(executor:IsInGroup(groupId) and executor:GetRankInGroup(groupId) >= minRank)
local isAdminCommand = context.Command.Group == "Admin"
if isAdminCommand and not isAdmin then
return false, "🚫 You do not have permission to use this command!"
end
return true
end)
end
proof?
Make s script where it saves how much u jump and when u jump back it displays a GUI with ur jumps and u jump that many times
explain again, im not very good at speaking english
Use AI to interpret it for u
alr
if u have the mine carts can u shownme it
local Player = {}
Player.__index = Player
function Player.new(name)
local self = setmetatable({},Player)
self.name = name
self.score = 0
return self
end
function Player:incrementScore()
self.score += 1
end
local p1 = Player.new("Alex")
p1:incrementScore()
print(p1.name, p1.score)
I dont understand what player.__index = Player does
It assigns the table Player to the key index inside the Player table.
So after this line, Player.index refers to the Player table itself.
so assigns a player to player table?
It lets a table fall back to another table
No
You need to look up what index does
Thats what I did
Look inside p1 for a function called incrementScore
If not found, check the metatable
If __index is set, check that table for the function
this is what I found
hm
I meant that as "Yes, you're right"
With your definitoon
definition
the official lua docs explain this best
Think of it like having a backup table
If u look for a value in table and it's not there it searches for the backup
The music 😂
what is even the point of jump property in humanoid
ye iam sending a new one...
nothing...
its just a gui that counts how many time you have jumped
SAND?
yea
yea i was just wondering in general, but idk why roblox doesnt make it easier to detect when player jumps
fr
unless theres a secret event for it which i just didnt know about
i see some ppl using VS for scripting in roblox, should i do it or just stick with roblox studio?
is this cool....?
do VS why not?
i mean not a reason to why not i was just wandering what changes when you use VS
idk tbh...
so just for the love of the game?
ive just used it for html, css, and js
thats fair
whats the best way to implement a cap on something
local Pet = {}
Pet.__index = Pet
function Pet.new(name)
local self = setmetatable({}, Pet)
self.name = name
self.hunger = 100
return self
end
function Pet:Feed()
self.hunger = 0
print(self.name.."HungerLevel="..self.hunger)
end
function Pet:Talk()
print(self.name.."barked")
end
local P1 = Pet.new("Dog")
P1:Feed()
P1:Talk()
Ok I m kinda understanding this
so lets say i have a farming game and i want the max in somebodies backpack to be 100 fruits crops whatever
any mistakes?
i cant find any
Not much changes
A bit more "complex" workflow with syncing rojo with studio
But overall nothing bad, really great tool
Scripting in studio is fine tough
The native "version control" roblox has is dogshit
Yooo
I understood metatables finally
local Pet = {}
Pet.__index = Pet
function Pet.new(name)
local self = setmetatable({}, Pet)
self.name = name
self.hunger = 100
return self
end
function Pet:Feed()
self.hunger = 0
print(self.name.."HungerLevel="..self.hunger)
end
function Pet:Talk()
print(self.name.."barked")
end
local Dog = setmetatable({},{__index = Pet})
Dog.__index = Dog
function Dog.new(name)
local self = setmetatable({},Dog)
self.name = name
self.hunger = 100
return self
end
function Dog:Trick()
print(self.name.."rolled over")
end
local d = Dog.new("richy")
d:Feed()
d:Talk()
d:Trick()
just use profileservice bro
its already like perfect basically
READ THE MESSAGE, IT IS A PROFILESERVCE
yeah i watched a tutorial and i heard it is aimed for big studios
so ig i shouldnt mind switching to it
version control?
the module thats already completed
by uh whats his name
oh wait thats profilestore
thats the old version
What course do yall recommend i buy?
git for example
imo version control is still useful for solo devs
Not necessarily pre game release
But post release its gonna be a life saver
i see, so vs makes updating a game way easier?
No vs code is just your editor haha
oh
Git could make it easier
Thats not roblox specific btw, i wouldnt mind all this when youre just starting out itll just overwhelm you
course for like scripting?
Are you brand new?
does anyone know why Cmdr just stopped working in my studio 💀
Check for errors
0 errors
What have you done to diagnose the problem?
it handles normal commands fine but not my custom ones
went back in version
it just like doesnt register my custom commnads in studio but works fine in a actual game
i kinda cant
cause of the game im working on
💀
ill figure it out just wondering if it was like a general error
Show your registration code
wdym
Cmdr requires you to register custom commands to its system
oh its just this bro 💀
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Cmdr = require(ReplicatedStorage.Game.Utility.Moderation.Cmdr)
local Commands = script.Parent.Commands
local Hooks = script.Parent.Hooks
local Types = script.Parent.Types
Cmdr:RegisterDefaultCommands()
Cmdr:RegisterCommandsIn(Commands)
Cmdr:RegisterHooksIn(Hooks)
Cmdr:RegisterTypesIn(Types)```
the devs just dont want me doing anything lmao
just weird tho cause it was working perfect and i didnt change any code
Yeah
I’ve gotten down all the basics
can anyone help me setup the effect that i already got and just put on the character like sol rng?
tbh i've used some courses but they dont do as much as like actually going into games and finding out how the developer used the code
it's way more useful and fastere
Ive been told that alot, but idk if i should do that if i only know the basics
yah ig ill not mind for now
I've been scripting for 6 months, I watch TheDevKings tutorials and some others, I then went into obbies (uncopylocked and perms) and i went to stuff like the water killing you if you step on it. I then pasted it into chatgpt, there is a chatgpt model or version that is for coding, it told me the meaning and then I deleted the script and recreated it.
It sticks in your mind
or use a model from the toolbox
can anyone help me setup the effect that i already got and just put on the character like sol rng?
aight
how do you get scripts from games?
could be better?
You don't need tô declare the player inside the function
Declare it outside , and for most of the cases, the character and the humanoid root part
Where is your script located?
hello guys i was wondering how does games like grow a garden saves player inventory??
With Datastores
but how do they do it for inv ?
does anyone have a script to get avatar robux value of player
With datastores,
did you do what i said in code help
on player joined, it pulls the values from what the player had stored in their inventory and copies it to their backpack
learning from uncopylocked roblox games probably isn't th best way to learn scripting
Whyt?
why*
code help sucks so im asking here
btw fontbuf is just my wrapper for the buffer library with a cursor added
Why is my profilestore not making leaderstats?
-- Services
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerScriptService = game:GetService("ServerScriptService")
-- ProfileStore
local ProfileStore = require(ServerScriptService.ProfileStore)
local function GetStoreName()
return RunService:IsStudio() and "Test" or "Live"
end
local Template = require(ServerScriptService.Data.Template)
local DataManager = require(ServerScriptService.Data.DataManager)
-- Access ProfileStore
local PlayerDataStore = ProfileStore.New(GetStoreName(), Template)
-- Add leaderstats and syncronize player data
local function Initialize(player: Player, profile: typeof(PlayerDataStore:StartSessionAsync()))
-- Leaderstats
local Leaderstats = Instance.new("Folder")
Leaderstats.Parent = player
Leaderstats.Name = "leaderstats"
local Cash = Instance.new("IntValue")
Cash.Parent = Leaderstats
Cash.Name = "Cash"
Cash.Value = profile.Data.Cash
-- Sync PlayerData
ReplicatedStorage.UpdateCash:FireClient(player, profile.Data.Cash)
end
-- Creates and stores profile
local function PlayerAdded(player: Player)
local Profile = PlayerDataStore:StartSessionAsync("Player_" .. player.UserId, {
Cancel = function()
return player.Parent ~= Players
end,
})
if Profile ~= nil then
Profile:AddUserId(player.UserId)
Profile:Reconcile()
Profile:OnSessionEnd(function()
DataManager.Profiles[player] = nil
player:Kick("Data error occured. Please rejoin.")
end)
-- save profiles for later use
if player.Parent == Players then
DataManager.Profiles[player] = Profile
Initialize(player, Profile)
else
Profile:EndSession()
end
else
player:Kick("Data error occured. Please rejoin.")
end
end
-- Early joiners
for _, player in Players:GetPlayers() do
task.spawn(PlayerAdded, player)
end
Players.PlayerAdded:Connect(PlayerAdded())
Players.PlayerRemoving:Connect(function(player)
local Profile = DataManager.Profiles[player]
if not Profile then return end
Profile:EndSession()
DataManager.Profiles[player] = nil
end)
I had to split the message up cus discord msg limit
Also dont ignore this person ^^^
WE are ignoring both of u
did you write this or did chatgpt
You need to be using ProfileStore in all of your Roblox gamedev projects! In this tutorial, we learn why it's better than default Data Stores and how to set it up. No sweat!
Thanks for watching! I'm a Roblox game developer teaching Roblox players how to create their own games. Subscribe to learn more!
Download ProfileStore:
https://create.robl...
This
I followed this
idk if i missed something
When I load game leaderstats just dont work
and i get this error
do you know what the script does
Its profilestore
what does the colon do
i think youre looking it up right now
you should ask the person who wrote the script why it wont work
Im talking in rodevs they fixin a bunch of my errors rn
after i fix one its another
i think i just missed some detailes
you'd be better off using gpt to generate code
hey could someone explain the difference between: Scripts,local Scipts and Module Scripts?
u know the difference between server and client?
nope
sever is the roblox place
client is the game running on persons device
nope > says the difference
lol
yeah thats pretty much the difference
server is where every player is on and client is the game on one device of a player
so
scripts are for actions for the whole server so for every player
local scripts are ment for the client so on speciffic players or one player on its own
who ordered a yappuchino
he asked
is that rufus
it is
i was kidding i love you
xD
take back everything i said
and a module script in Roblox is a special script used to store reusable code like functions or variables.
ohh i see
so local scripts can get exploited
what about the normal script function
and the modulus one
ohh
i see
what abt the normal non-local and non-module
i have been using string keys for fast table lookups but i think its also taking up a lot of Cpu usage what could i use instead
Number
how would that match the speed of table lookups?
Im pretty sure arrays are faster but its 3am i can always be wrong
i have been recommended to use vectors as table keys but to make it work way better i need to learn how to cache/ reuse vectors
U can just reuse by getting the keys
Im missing something
not really since in my program i have to recreate/ destroy tables often. even though i do reuse tables its better to have an good Cache
Why do u have to destroy tables
because they are no longer in use and they are just being a waste of memory since they are not in use
Why not have a reference to one table for where u need it
yeah that's why i used stringed vectors as table keys but they weren't very efficient in large batches
That does not make a difference
I suggest either use vectors serialized to buffers as keys or have a structure of sub arrays per chunk and axis
i did use buffers at one point but they weren't very fast since to find a vector in a buffer you had to either create a lookup table with the key being the vector and the value being the buffer place value or you would have to loop through the entire buffer. while it is good for memory its not good if you constantly use it
I do agree however i cant say if this would be that beneficial
if converting my string keys into cached vectors does not help or makes it worse i can always change my script history and revert it back
Whats the issue though
the issue is the amnt of Cpu usage my program when i use it it easily goes to 80 in fact when someone else tested it their cpu peaked at around 400 witch is most likely why their fps was very low.
Are u using actors?
Also thats really fire
i might in the future but i am trying to figure out a good way of using them that doesn't require remotes, i may just use them to make the display faster but because of the version of Canvas draw i am using it might cause visual glitches like when i tried to make the gameloop very renderstep
Why would u need remote events for actors
@surreal flower saiod he could help
because i cant give the actor a buffer unless i use some other method
Do u mean communicating between actors?
Im level five but i cant send gifs?
kind of since for it to work (for the buffer writing) i would need to make it create a new buffer that fills in a section of it and then combine them all to create the final display buffer. i am sure there is a better way of doing this but i am not sure
I havent used actors before making this chunkloader but basically what i did was gather chunks and split them across a amount of actors which will start their parallel connections when the chunks get sent, then every frame i do everything as efficiently as possible. Stuff such as the parent of an object have to be written in serial so what i initially did was in my for loop every time run the parenting in serial and make it parallel again, however i doubled the peformance by making a parenting queu so i made an array of chunks that had to be parented to their original parent or nil and then after that i loop thru the queus and parented them
Holy yappachino i know
For me it was really the order of doing things, i dont think it will be a problem sending a message to an actor often because they are made for it
yeah i am just not sure how i could use actors in my time line since i am translating a bunch of tables into one display buffer that contains 700 triangles so no matter how many blocks are on screen only 700 are displayed although the rewrites are around triple. this was to fix some common visual bugs i got when displaying things on canvas draw 3.4.1 (an older version compared to v4+). so the only way i can see myself using actors is if i used multiple display buffers one for each actor and i assign chunks to write then display them one after the other but then there are other issues with that like how do i know witch block should be rendered in witch actor and in what order should i display them etc
I would just send the initial data to each worker which they should render
Then just connect to prerender in parallel and do ur render code for the assigned blocks
I go to sleep now, i hope i helped 😃
it did help thanks man 
Hello, I was wondering if anyone had suggestions on the best way to learn scripting. I've tried tutorials but I find myself still not fully understanding. any suggestions would be appreciated!
making your own game is a great way to learn
make a game to learn not learn to make a game
so like a mini game to use what you learned?
pretty much yeah start with something simple
then you get set yourself on more complex goals
okay thanks, do you have any small minigame suggestions? idrk what to work on rn
hmm
try making a start menu for your game
u dont really need to know anything to do that so its a good starting point since pretty much every game needs one and you can always make it more complex later on
okay thank you!!
Looks good
I made terrain gen a while ago with chunks, im planning on making it in parallel since it was recommended to me
so yall - lua local currentPivot = AirPlane:GetPivot() local planeRight = currentPivot.RightVector local worldUp = Vector3.new(0, 1, 0) local rollDirection = planeRight:Dot(worldUp) < 0 and -1 or 1 tspmo, like if the plane goes full 180 roll then it will have the roll direction flip to keep the airplane fully flipped 180, is there any other solutions or something, ive tried so much stuff and none worked.
pastebin.com/hckec5S
weird thing, flight works on the local host studio sesh, but when i go to live ops, it stops working. any possible fixes?
^^ link not clickable since HD bot would remove it
I'm really sorry for the late response, yeah sure, I'll be home in like 2 hours
StarterGui
is it a localscript
wyta
is this a bad way to store the access codes (the index is a placeholder)
Any good projects I should do for my portfolio got a placement system with saving rn
honestly most of these greedy people want a working gui menu with settings and loadouts and such💔
let me get hired for something not gui related🙏
Yeah i was looking through scripter-hiring and so much is just like ui lol. I might make a inventory system
region better than using a physical hitbox?
can someone help me real fast
what helpu need?
so basically, I have coded this rng game but whenever I try to change the names of it, the names won't change
Hm
I cant help without looking at the code
aight ty
do I dm you?
@autumn mirage DM