#code-discussion
1 messages · Page 55 of 1
Google if you can store tables in datastores and everything says no, and ive tried in the past
Calamiplex [ Need new people ]
-=+{ LUA }+=-
-=+ Need Scripters And Modelers +=-
-=+ You Will Recieve 5% Revenue +=-
-=+ As You Progress You Will Recieve More +=-
-# -=+ The Game Is About Natural Disaster Type Of Shit +=-
Bro
then you have no idea what u r doing bro you can put tables in datastores since forever how do u think games save a large amount of data???
JSON
tables are converted to json in datastores anyway
How long have you been scripting
like a year more or less
Because you didnt used to be able to store tables in datastores..
theres tons of forums of people asking how to save tables to ds
bro
how do i do it tho?
@weak radish
You didnt used to be able to do it
Have you even tried?
maybe in like 2014 you werent able to do it but as long as i have been scripting it was possible. and in thedevking’s tutorials (which are from like 2017) he says that you can save tables to datastores so u gotta be trippin
Instead of answering me google it
????
you used to not be able to save tables
you are the one with the question, google it yourself
like a long long long time ago
BRO
Omd idk if I have the patience to talk to you dngr, but im saying google "how to save tables to datastores", there are TONS of forums
those must be some very old forums then
saving tables to datastores is not difficult
Theres literally one from last year
you used to have to use jsondecode + encode
I realise that now but I was just saying, it didnt used to be like that
Bro
your gonna get punished
enjoy
/post
Guys if i wanted to add abilities to my game and wanted to enequip and equip then i should make all the abilities module scripts and use them when needed right?
Yeah
ok thx
does anyone know how to add an anti afk system in games? (it rejoins the player every 15mins so they can afk)
local PLACE_ID_TO_TELEPORT = game.PlaceId
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local player = Players.LocalPlayer
local button = script.Parent
local teleportEvent = ReplicatedStorage:WaitForChild("RequestTeleport")
local isAntiAFKEnabled = false
local lastCFrame
local startTime
local monitoringCoroutine
local function hasPlayerMoved()
local currentCFrame = player.Character and player.Character:FindFirstChild("HumanoidRootPart") and player.Character.HumanoidRootPart.CFrame
if currentCFrame and lastCFrame then
return currentCFrame ~= lastCFrame
end
return false
end
local function teleportPlayer()
print("Requesting teleport...")
task.wait(1)
teleportEvent:FireServer()
end
local function startMonitoring()
if monitoringCoroutine then return end
monitoringCoroutine = coroutine.create(function()
while isAntiAFKEnabled do
task.wait(1)
if hasPlayerMoved() then
startTime = tick()
lastCFrame = player.Character and player.Character:FindFirstChild("HumanoidRootPart") and player.Character.HumanoidRootPart.CFrame
else
local elapsed = tick() - startTime
if elapsed >= MAXIDLE_TIME then
print("Player idle for too long, teleporting.")
teleportPlayer()
break
end
end
end
monitoringCoroutine = nil
end)
coroutine.resume(monitoringCoroutine)
end
local function toggleAntiAFK()
isAntiAFKEnabled = not isAntiAFKEnabled
if isAntiAFKEnabled then
button.Text = "AFK MODE: ENABLED"
button.TextColor3 = Color3.fromRGB(0, 255, 0)
startTime = tick()
lastCFrame = player.Character and player.Character:FindFirstChild("HumanoidRootPart") and player.Character.HumanoidRootPart.CFrame
startMonitoring()
else
button.Text = "AFK MODE: DISABLED"
button.TextColor3 = Color3.fromRGB(111,111,111)
end
end
-- Update tracking on respawn
player.CharacterAdded:Connect(function(character)
character:WaitForChild("HumanoidRootPart", 5)
if isAntiAFKEnabled then
lastCFrame = character.HumanoidRootPart.CFrame
end
end)
-- Setup default state
button.Text = "AFK MODE: DISABLED"
button.TextColor3 = Color3.fromRGB(111,111,111)
button.MouseButton1Click:Connect(toggleAntiAFK)```
It does check its just not allowing me to join back like it says "You have disconnected please rejoin" or "Client has innitiated disconnect"
it works it just wont allow the full rejoin
Are you attempting to join a server thats closing?
That might be the issue if ur testing alone
ah, I am testing alone
yo nice thinking dude
didnt even think of that
Well I hope that was the problem, thanks
- Server Sided:
print("Teleport request from", player.Name)
local character = player.Character
if not character then return end
task.wait(5)
local RootPart = character:WaitForChild("HumanoidRootPart")
local TeleportTarget = workspace.Gate:WaitForChild("TeleportPart")
if RootPart and TeleportTarget then
RootPart.CFrame = TeleportTarget.CFrame + Vector3.new(0, 5, 0)
end
end)```
- Local Script:
```local Gate = script.Parent
local Teleport = game.ReplicatedStorage.RE:WaitForChild("Teleport")
local player = game.Players.LocalPlayer
Gate.Touched:Connect(function(hit)
print("Gate touched!")
if hit.Parent == player then
print("Firing server...")
Teleport:FireServer()
Gate.BrickColor = BrickColor.new("Lime green")
Gate.Transparency = 0.5
Gate.CanCollide = false
task.wait(3)
Gate.BrickColor = BrickColor.new("Really red")
Gate.Transparency = 0
Gate.CanCollide = true
end
end) ```
Anyone knows why this doesn't work when I touch the gate part?
If stuff like that happens u can also use reserved servers for rejoins
so like private servers?
Not exactly
well its gonna be an afk for ugc game and it basically will just rejoin any active server/ the last server it was in
any scripters qualified in combat systems and abilities would be interested in a job
Its a closed off server only players with a specific code can join and you can create 1 at will without worry itll close on u
oh so its like a key that you need to have to access to the server?
ah okay, would that be good to use for most players using that?
TeleportAsync?
not sure I used chatgpt 😭
I'd only say for rejoining or sub private servers
teleportEvent:FireServer() thats what im using
its serversided cuz its a local script on a text button
What is teleportEvent conne cted to tho?
local TeleportService = game:GetService("TeleportService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local PLACE_ID = game.PlaceId
ReplicatedStorage:WaitForChild("RequestTeleport").OnServerEvent:Connect(function(player)
print("Teleport request received from player:", player.Name) -- Debug print
local success, err = pcall(function()
print("Attempting teleport to place ID:", PLACE_ID) -- Debug print
TeleportService:Teleport(PLACE_ID, player)
end)
if not success then
warn("Teleport failed:", err)
else
print("Teleport succeeded!") -- Debug print
end
end)
I'd honestly change it to TeleportAsync but its not needed
how would it be better? genuine questions since I dont know
You can check documentation on the different teleports you can use and what sparks ur fancy
TeleportAsync is a merged version of all the different teleports that have existed in the past
Can teleport upto 50 players at once can create reserved servers can be used to join players with a jobId ect...
oh, thats cool, ill research more about this and let my scripter do it for me 🤣 thanks man
?
Oh in the past
Basically, I'll show you that using the Animator on the server causes the animations to be replicated everywhere, including on the server itself. I believe this is a big issue because it unnecessarily consumes server resources.
Here the animation is triggered from the client, and it uses the server-side Animator instance. (you can see that it gets replicated on the server-side too)
In this second approach, the player who performs the action animates locally, and at the same time sends a packet to the server. The server then notifies the other clients to play the same animation on that player.
i'm not sure how to use the nexus.lua file for roblox account manager. i don't have their discord server either, so if someone knows how to make the executor work, it'd be very much appreciated.
for combat systems what would be the best way to detect a player within a zone and damage them?
Would it be a .touched event with a hitbox part? or region3 or world root get parts bound in box?
GetPartsInPart i think
get parts bound in box?
theres this module called zone plus im also thinking of using that but i dont know which would be more optimized
GUYS
i need help
how to make sure that the hair and the head are shattered and that the hair doesn't float in the air
Does anyone know how to disabled autojump
StarterPlayer service ->
i dont think you can, i think you gotta reupload to get a new id
i cant?
i bought a game
and idk where they put the ids
does any1 knows how to create a clashing system based for swords on magnitude or collision method ? i couldn't find any vids abt it
I tried that but it didn't work specifically for pc.
Up
Are you looking for a tutorial or just the idea behind it?
tuto behind it
already got the idea ig, its either magnitude or collision
I did a prototype once, I didn't use collision, just plain magnitude comparison
im looking for someone who knows abit of scripting like me so we can learn together and work together
huh, i dont think pc does has auto jumping
anyways you can search up, im not sure
Like when you hold space bar is what i mean mb for the confusion
Im trying to make it so it dosent keep jumping when you hold it and instead there is a db between each jump
you would have to code a jumping mechanic yourself then
Oh ok thats fine, I just thought there was a setting but wasent sure, thanks
you're welcome
why does roblox break my entire script when i have an error but their goofy ass has like 10 💔
Skill issue
But like you gotta store your actual pet models somewhere too right and when it’s equipped
When making inventory with the scroll frame how do I add an image background to it and also how do I make it so the more inventory the scroll gets longer?
anyone got some good resources on learning ModuleLoader
ye animations on the server are a bad idea
but i didnt understand whats wrong?
you want a way to optimise it?
Can you wait a minute, english is not my first language so I've got trouble phrasing xD
@jolly vessel 😞
alr
I'll try to explain what troubles me
what are you tryna do, add images or expand the scrolling frame
wym? you can have a table to store the pets data and have a refrence to the model in there and a refrence to an image string?
I want it to auto expand maybe, for example the scroll is big meaning it wont scroll a lot, but the more stuff gets in inventory the scroll gets smaller cuz inventory getting bigger
I hope you understand my explaining is a bit weird maybe
Wait how? How can you have a reference of a model there
pet = {
model = game.ReplicatedStorage.models.pets.somepetmodel
}
just create a variable for the folder so you dont have to type the whole thing every time you want to add a new model
to expand scrolling area im pretty sure its the canvas size value
Also want to have a background but the scroll frame doesn’t let me add background image to it @jolly vessel
But can’t it auto expand?
nope
you can add a script that auto expands it
@jolly vessel
What’s bothering me is a technical detail.
It’s obviously a bad idea to play an animation on the server, so it makes sense to want to handle it on the client side instead. But what I find frustrating is that everyone keeps saying that without really explaining what it actually implies in terms of architecture.
While digging into the Animator documentation, I noticed that you can retrieve and play a track from an Animator that was instantiated on the server. That made me think, “Great, Roblox handles replication for me!”
But then I ran a test and turns out, that’s not what happens at all. When you create a track on the client and rely on a server-created Animator, the animation also plays on the server, which is... really counterintuitive.
So in the end, it seems like we do have to handle it ourselves, like the approach shown in the second video.
So it has a set scroll limit already?
yes
add an image to its parent frame
So I should make its parent an image and then make the scroll frame transparent?
add an image as a child to its parent frame
Are you sure I can’t auto expand it? 😭
you can create a script to do that
Is that good?
roblox studio is confusing, its better to do it the 2nd way if it saves more resources
yes because roblox optimisation sucks
Also when making inventory you add an Uilayout something I seen some games they have like an upper part for equipped selection in same frame I think how is that possible?
uigridlayout
Yeah that I think
does anyone know how to code a npc buys your tool system? just a imple one becaus eim not a good coder but like when i click on a proximity prompt thats plced in a npc based on my tool nme like sword the npc will buy the sword fo rlike 50 cash and th ephone for 30 cash eveytime i click the proximit yprompt it just buys the part based on its name and price
also i dont think they do, they probably just have a second invisible frame for the equipped
But how do they even do that, the UiGridLayout doesn’t let you right?
So the second method is what people usually go with?
i can send the code
thats easy
"im not that good" 👍
uigridlayout only affects the frame it is parented under
people dont usually complicate it that much, for player anims always go client, for npc anims go server
they probably just use seperate frames
then send it bruh
Ohh ok
this one if statement is holding my entire script together 🙏
if i == 1 then
continue
end
yk we should really invest in mind reading technology so we can fix people's scripts
I get what you mean, and I’m definitely not trying to overcomplicate things. But as far as I can tell, if you want animations to be visible across clients (e.g. a player doing an emote that others can see), then simply playing the animation locally isn’t enough. Meaning the server needs to act as a broadcaster. Otherwise, how do other players know to show the animation?
the server auto replicates any animation a client plays so all other clients see it
Yes, exactly and that’s actually my point.
When the client plays an animation through an Animator created on the server, it does replicate to other clients, which is great but it also plays on the server itself...
if you dont want it to play on the server, make your own custom animater
if thats possible
then just fire all clients
fire
“Couch fighting game”
cool idea
Yes it's possible, and that's what I showcase in the second video.
Sorry if it wasn’t super clear with the three windows, the top-left one is the server, the bottom-left is Client 1, and the right one is Client 2.
You can see that the animations are played by the clients, but not by the server, which is exactly what I was aiming for.
then use it, im not sure how well made it is but if it suits your needs go ahead
I’ve talked to quite a few people about this whole animation replication topic, and I get the feeling there’s a bit of a misconception around how it actually works.
A lot of people seem to think they’re optimizing things by relying on the built-in replication, but in reality, that’s not the case. Animations end up playing on the server.
Like you said, the real solution is to set up a custom service that handles broadcasting and animation logic cleanly across clients. At least that's the conclusion
i got the selling system to work all i did was forgot to make some words like Function capslock 😅 i always deal with forgetting to caps lock
could sm1 help me with this extremely complex code? :
print("helo world")
print("Hello, World!")
guys
yes
me wanna be a scripter
gotta start somewhere bro
@jolly vessel Replicating animations between players is fairly straightforward.
The tricky part is having the server notify clients when an NPC should play a specific animation. For that, I’ll need to set up a proper system, probably involving tags to categorize NPCs into groups (to make lookup easier), and also some kind of ID system, maybe using attributes to uniquely identify each entity.
Since we can’t rely on passing instance references (pointers) directly between the server and client sessions, having those IDs will be necessary for clients to resolve which NPC to animate.
just watch couple vids or read the docs and go thru some basic little tutorials on basic syntax and stuff then slowly work on small projects yourself and use the web to learn what you need for specifc things
never watch tutorials on how to make something full it's better to research the small parts and put it all together atleast that's just me could be different for other people helps u learn way bettert
try making an obby game if you’re a complete newcomer
make it rain tacos if you're just starting
just don’t over rely on tutorials or free models
Guys I'm curious to hear your thoughts on what I said
and i got some tutorials on my old channel if u need they might be outtated tho lol the channel is Xcrossy but its like main menu tutorails and stuff
sure
goodluck bro
Design is mostly a group effort, right? 😄
like general game design?
wym bro
What random quick things should I make as a beginner who understands functions loops tweens (kinda) and tables (kinda) and variables
Haha I meant like technical design
Here
me personally i would stick to the default one
i try to replace too many things roblox made
crazy, ur a genius 🔥
But from what I understand, the default animation replication can actually be pretty heavy in terms of bandwidth.
It seems like the server sends full joint data for every frame of every replicated animation which adds up fast if you have dozens or even hundreds of animated entities, like in an MMO.
That’s why I’m exploring lighter alternatives where clients handle the animation locally, and only minimal info (like “entity X is doing animation Y”) is sent over the network.
It’s not about replacing everything Roblox provides just optimizing where it's critical.
Can someone in here help me
with
I need to know or figure out how to record inside the game
wym like screen record
u can use OBS
How?
download obs
and look up tutortial on basic recording and u will be good
take like 5 mins
For your character to have a camera that records
in roblox?
good luck on that 😂
ohhh
I would be a really good game but the dev doesn't keep up on it
yeah bro made it during hte content warning hype got his bread and dipped lol
Optimizing games is a real hassle as you can see here, but it's worth it : https://devforum.roblox.com/t/how-we-reduced-bandwidth-usage-by-60x-in-astro-force-roblox-rts/1202300?page=2
Why are you using an obscure data type to pack your data instead of simply directly sending a binary string which would not only reduce your bandwith usage even further but be faster to run as well as it would simplify your code. You also run the risk that roblox might change the replication behavior for these data types down the line.
happens a lot with trend games
Also, using a packet library that allows for more compact data transfer is really important
Yeah
As well as using a pool or cache to avoid unnecessary and expensive memory accesses
its a start
what is this
all that matters
i think he was just confused on what it actually was
Discord: https://discord.gg/bEn49K5JUt
Patreon: https://www.patreon.com/Suphi
Donate: https://www.roblox.com/games/7532473490
0:00:00 - Intro
0:00:05 - Animation
0:11:42 - Synchronization
0:16:50 - Paused
0:19:20 - Door
0:46:05 - Outro
what about a character replication system where u store the cf data in a script then make the player render in the characters
should i use profile service or datastoreservice?
Did you just make a part or something
Or is this something else
scripted it all
profile service, never rely on the default roblox datastore as a standalone, because once it goes down, all data management is cooked
custom data modules protect against all that
some stranger gave me this random script for free and said it gives unlimited robux if i put in game 🥰
As in you just created a part with a script
Or is it like a disappearing platform or something
how do u pause a task until something happens
i only want the proximity promt on the first item (when i = 1 basically) but it's doing all of them
I mean you could create the prox prompt only if i==1
oh yes ty
but like
what happens when i want to iterate through
like when it's clicked it's gonna change to the next object in the dictionary
I guess ProximityPrompt.Triggered:Wait()
Yea
It'll wait until the prompt is triggered
If that's what you want
tysm
it works now but the prox promt doesnt destroy
DrinksBE.WaterBE.Event:Connect(function()
for i, v in pairs(DrinksRecipes.Water) do
KitchenBeam.Attachment1 = v
local ProximityPromt = Instance.new("ProximityPrompt")
ProximityPromt.Name = "ProximityPromt_"
ProximityPromt.Parent = v.Parent
ProximityPromt.Triggered:Wait(function(player)
ProximityPromt:Destroy()
end)
end
--[[
KitchenBeam.Attachment1 = Plate_STEP1_Attachment ]]
end)
Use :connect instead of wait???
then this will happen #code-discussion message
Just try this DrinksBE.WaterBE.Event:Connect(function()
for i, v in pairs(DrinksRecipes.Water) do
KitchenBeam.Attachment1 = v
local ProximityPromt = Instance.new("ProximityPrompt")
ProximityPromt.Name = "ProximityPromt_"
ProximityPromt.Parent = v.Parent
ProximityPromt.Triggered:Connect(function(player)
ProximityPromt:Destroy()
end)
end
--[[
KitchenBeam.Attachment1 = Plate_STEP1_Attachment ]]
end)
yea that doesnt work
K
that dosent look safe 😭
Everything
Wait doesn't work like that
DrinksBE.WaterBE.Event:Connect(function()
for i, v in pairs(DrinksRecipes.Water) do
KitchenBeam.Attachment1 = v
local ProximityPromt = Instance.new("ProximityPrompt")
ProximityPromt.Name = "ProximityPromt_"
ProximityPromt.Parent = v.Parent
ProximityPromt.Triggered:Wait()
ProximityPromt:Destroy()
end
--[[
KitchenBeam.Attachment1 = Plate_STEP1_Attachment ]]
end)
Try something like this
:Wait() yields until the signal is fired
Before continuing with the code
You don't pass a function to be executed on the firing of the signal
That's :Connect()
o ty
What is drinkbe and waterbe...
Ion
bindable events
What is needed by you:
2 player teleport system
2 player movement system
Spin the wheel
Gamepass system
Crate System
Troll System
Ui System (such as opening/closing, sounds, animations, & reward system) This should be the easiest one, but I want it as a module script not a local script per frame)
Skin system (with perks for different skins) There will also be a camera system allowing to equip skins and animations
Interaction System in the lobby
Checkpoint system/badge system
Obstacle system
how much would yall charge for this?
co routines
pause the co rountine until you want to add the next proximity prompt and then repeat that untill all of them are done
they run along side the main script so it wont yield anything
local testPart = game.Workspace:WaitForChild("testPart")
local touched = false
local function changeColor()
testPart.BrickColor = BrickColor.New("Toothpaste")
task.wait(1)
testPart:BrickColor = BrickColor.New("Medium stone grey")
end
testPart.Touched:Connect(function()
if not touched then
touched = true
changeColor()
task.wait(2)
touched = false
end
end)
It's not working 😦
any errors?
you are doing : instead of . in the changeColor() function
for the brick color of testPart
Anything else?
run it and see if there is another error thats all i can see on first glance
K
i have a problem in my game (when i go to shop and then leave the shop and then come again, the shop will not apear again)
does anyone here know how i'd be able to patch exploiters flinging people?
How do exploiters fling people in your game?
By moving their own bodies too fast?
You're in some way giving network ownership to the exploiter, or allowing the exploiter to create/redirect/configure instances
yeah they spin themselves really fast, couldn't i just make the humanoidrootpart CanCollide false?
i'm not too sure, i took the game over and basically 90% of the game wasn't even scripted by me, very messy so could be something deep
You can just turn off collision between players
Just assign collision group to the every part of character every time their character is added
Then you need to say that this collision group can not collide with itself
do what roblox tells u in the link i gave u if u want to turn off player colliding with others
alright, thank you
Would be fine for 20k robux.
got a problem with my sword held
i quit (i will never make a good roblox game) see ya
- i dont have the plugins i need to make a good roblox game cuz they cost robux
so mutch robux
you dont need plugins to make a game
anyone wanna playtest a volleyball game
and i mean a lot of the good plugins are free too
like archimedes
also, just bc something is difficult, doesnt make it impossible
ye but i dont know how to script very well and what about moon animator
just look at this animation waht goffy is it
you can use the default roblox animator
wait
i tried to learn to script over 2 years and the only thing i am good at is uhh playing games lol
i mean im mid too
and its been a few years
wait come to VC Private 2a ill show you my project
it took me 5 to start to learn (mostly bc i was an idiot by not actually trying to learn)
oh
how old are ya
wth
5 years is insane
well if you wanna change the upgrade
it depends on how you want to structure things
@blissful sparrow wait hold on
stop discussing your project first
how old are you?
do i need to tell you?
no
oky
but like
i know mb
that's what being young and dumb gets you
my bad
sometimes this stuff takes time
and you need to wait until you're old enough
cause like there's a lot of logic
and you might not be able to grasp it rn
wait look at my screen 1 sec
yes
properties?
i mean yea
i get you know these
i mean like not really
you can declare a variable without local
local just sets it in the local scope
i get that
and all
okay
lol
i was ling
i like start it like uhhh]
1-3 weeks (but i learn like 1h a day
sometimes never a day
oh ok
sry for wasting ur time 😦
i mean just keep at it
oky
i feel like its fun but i can only play on my pc 1-1:30 H a day 😭
welp
can i add you on discord?
tbh ion
that kinda sucks
Part1 needs to be a BasePart. not the model itself
saw it, i corrected it now, just got another problem now
but it doesn't dispear when i press the bind to pick up the sword
don't know if i need to use a tag for that
is the sheath a seperate mesh?
well, the model holds the sheath meshes. if you want it to simply go invisible, just set its transparency to 1. if you want the sheath to detach from the sword, disable/destroy whatever is holding it together
in code, have it 0 when unequipped, then 1 when equipped
or have it detach if you want it visible on your back when holding it
if action == "Equip/UnEquip" and not char:GetAttribute("Equipped") then --equipping
char:SetAttribute("Equipped",true)
Welds[plr].Part0 = rightArm
Welds[plr].C1 = WeaponsWeld.Leather.HoldingWeaponWeld.C1
elseif action == "Equip/UnEquip" and char:GetAttribute("Equipped") then --unequipping
char:SetAttribute("Equipped",false)
Welds[plr].Part0 = torso
Welds[plr].C1 = WeaponsWeld.Leather.IdleWeaponWeld.C1
end
in those line ?
yeah
i got two mesh for the stealh too
isn't it a problem aswell?
cuz i can't make the model itself transparency, can i ?
no. you would just make both visible/invisible
way too hard, i can't get it, the shealth isn't getting detected
local function SetSheatheVisible(char, visible)
local weapon = char:FindFirstChild("Leather")
if not weapon then
warn("Weapon 'Leather' not found in character")
return
end
local sheathe = weapon:FindFirstChild("Sheathe")
if not sheathe then
warn("Sheathe not found in weapon")
return
end
local mesh1 = sheathe:FindFirstChild("Meshes/BAO sword_S2")
local mesh2 = sheathe:FindFirstChild("Root")
if not mesh1 then warn("Mesh 'Meshes/BAO sword_S2' not found") end
if not mesh2 then warn("Mesh 'Root' not found") end
if mesh1 then mesh1.Transparency = visible and 0 or 1 end
if mesh2 then mesh2.Transparency = visible and 0 or 1 end
print("SetSheatheVisible ran. Visible =", visible)
end
is this a local script?
i would fire a RemoteEvent to then change the transparency of the meshes. unless you're already doing that
the only remoteevent i have rn is purely for equipping the sword
so you're firing that and using that function, right?
please tell me u first handle it on the client before sending it to the server
yea but, it don't use it on the hide shealthe
so then what calls that function?
do u first equip it on the client and then send it to the server ?
believe me do this
-- SERVICES --
local Players = game:GetService("Players")
local RS = game:GetService("ReplicatedStorage")
-- FOLDERS --
local Models = RS.Assets.Melee
local Weapons = Models.Swords --
local WeaponsWeld = script.Welds.Melee
local ClientRemotes = RS.Remotes.Client
-- EVENTS --
local WeaponsEvent = ClientRemotes.WeaponsEvent
--- OBJECTS --
local Welds = {}
Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local torso = char.Torso
--
char:SetAttribute("Equipped",false)
local Weapon = Weapons.Leather
Weapons.Parent = char
Welds[plr] = WeaponsWeld.Leather.IdleWeaponWeld:Clone()
Welds[plr].Parent = torso
Welds[plr].Part0 = torso
Welds[plr].Part1 = Weapon
end)
end)
Players.PlayerRemoving:Connect(function(plr)
if Welds[plr] then
table.remove(Welds, table.find(Welds, Welds[plr]))
end
end)
--
WeaponsEvent.OnServerEvent:Connect(function(plr, action)
local char = plr.Character
local hum = char.Humanoid
local torso = char.Torso
local rightArm = char["Right Arm"]
if action == "Equip/UnEquip" and not char:GetAttribute("Equipped") then -- equipping
Welds[plr].Part0 = rightArm
Welds[plr].C1 = WeaponsWeld.Leather.HoldingWeaponWeld.C1
elseif action == "Equip/UnEquip" and char:GetAttribute("Equipped") then -- unequipping
char:SetAttribute("Equipped", false)
Welds[plr].Part0 = torso
Welds[plr].C1 = WeaponsWeld.Leather.IdleWeaponWeld.C1
end
end)
if there is a player with high ping it wont feelresponsive
thats the current code of the weaponserver
deleted the previous part for the hiding stealhe since it didn't worked
and thats my weaponhandler
-- SERVICES --
local RS = game:GetService("ReplicatedStorage")
local uis = game:GetService("UserInputService")
-- FOLDERS --
local ClientRemotes = RS.Remotes.Client
-- EVENTS --
local WeaponsEvent = ClientRemotes.WeaponsEvent
uis.InputEnded:Connect(function(input, isTyping)
if isTyping then return end
if input.KeyCode == Enum.KeyCode.One then
WeaponsEvent:FireServer("Equip/UnEquip")
end
end)
ye u dont handle it on the client first
in here handle the equip first : if input.KeyCode == Enum.KeyCode.One then
WeaponsEvent:FireServer("Equip/UnEquip")
end
client sided
so it feel responsive for the owner off the sword
tryna figure out how to hide my stealthe actually
would optimize the code later if its look too much spagetti and have ton of lag
the hell is a stealthe ?
and why do u wanna hide it ?
cuz
ah
who the hell handle a sword with a stealthe on
depends for who, im 2iq when it comes to code
create a diffrent model for the sheathe
and weld that to the charachter where the sword should be
then if u equip the sword the sheate will remain in place
Mo vent
te hell do gie ier
Kiken
so i separate my sheathe form my leather sword ?
basicly yes
tot wane e je school
Tot vijf
baha
but, i've got the sheathe in my Replicatedstorage and im my serverscript
Helpt em mo ne bitje
it would work alone then, theres no current function for the sheathe ITSELF
like, only the whole sword is getting dragged when im using my bind to pick it up
if i'll separate the sheathe form it and put it in a different folder, it would do absoluty nothing
something is attaching the meshes together. you have to delete it
wht
like a weld or something
theres nothing inside
the weld/constraint doesnt have to be parented to the mesh itself to attach it to something
look for any welds/constraints where one of the parts if one of the meshes
hello 🙂
or you could call :GetJoints() on it
hi
I want to make a quests system compatible with daily, weekly, monthly and normal quests.
For quests I would use
type Quest = "Daily" | "Weekly" | "Montly" | "Normal" |
I would also like for a function that I made update quest progression, which it would do by looping through all of the quest objects the player has. However if a questhad multiple data types how could I set that up?
type QuestData = "Coins" & "Diamonds"
Or would I just loop through the progression types in the quest instance like
{
Type = "Daily"
Progress = {
["Coins"] = 10
["Diamonds"] = 50
}
} and then a seperate module for the requirements.
Nvm realized I should just loop through progression since its a type alr
dont bother learning to script now
Wdym
if you are just starting out honestly just vibe code
yuh bro wdym?
Ive been coding for a year and I was using imperative coding but I would like to learn oop as it fits more for optimizations cleaner codes and bigger frameworks and much more. I alr was using modules and such so I was technically partially doing so but I was just using it for reusability and frameworks not much for it being oop.
never knew that luau has official mascot lol (until now)
you dont need oop with roblox projects
What about optimization and such
And could you explain why many people were telling me to switch to oop
oop doesnt provide optimisation
it only provides organisation
and that is why its encouraged but its completely optional
you do not need oop
What about it being intuitive thats why it started existing in the first place
Is there a way to make invisible frame with a button and make it all invisible but u still if u click on the button place it clicks it?
its not you'd have to get into metatables and metamethods
theirs more work
oop is just about organisation
No only by making the frames bg invisible but not through visible property as it disables all the childs visibility and active property
not having to repeat yourself
Any idea
you can already do that with a modular based system
Ok so itis possible through back ground visibilty
I want to do such because it helps organization and such and learning diff types of progrmming is better
using velocity from a localscript to make a partmove when you touch it, how do you make it slow down and then stop?
type casting is completely optional its just scripters who have egos do it to make themselves look smart
the same goes with learning roblox typescript
its all an ego / signal mechanism
even though roblox ts is slower since it has to get compiled into lua
Was me lol I want to change such
they are just asking for a performance loss
I wanna stay with luau
using velocity from a localscript to make a partmove when you touch it, how do you make it slow down and then stop?
Stick to a modular based codebase, and learn parrallel scripting
as well as serialising binary data via buffers
and use useful dependencies such as goodsignal made by stravant
thats the only advice u need
dont listen to anyone else's bs
back in my exploiting days I used to decompile these front page games
their code base was complete dogshit
no use of modules, no oop, nothing
dont overthink it
overthinking is the biggest problem I made in roblox development
But so what ur telling me is I dont need to use oop or start using it and just structure my code better and use types? To prevent issues
u dont need types unless ur coding in strict mode which again is optional
people only use type casting for intellisense thats all
shit im in the wrong channel. #code-help
and u dont need oop
Well ig I am but I just wanna improve organization and such cuz I had many times where I had to look into stuff for hours due to bad structure and such stuff
a modular service / controller based codebase is a great way to organise ur code base
similiar to Knit however I would not use it since its obsolete
if you want to learn oop you can its optional though just as how type casting is optional
all u need is my advice ^
But is it worth it
not imo
Type casting I feel like yes
I've used oop many times before
theirs no need
I can code systems normally just fine and not have to use oop
Can u add me for more advice urs is so gud its the same thing my dad said hes a full time programmer my first language was luau and I feel in love in roblox game devving I wanna make a livving off id it one day
Cuz I have some more questsions
Tysm for helping me I would have overthought this lol
Ill ask u smth a bit later if thats okay in dms
wtv u need
guys i wanna start my first scripting practice, where do i start and what system is the easiest to start with
If player touched a part there exist a event to detect (part.Touched) it then what event exist and what to do when player unstepped of the part
can someone gimme a task
I recently made a modular hunger system
my first modular based code
Oop is really useful tho u can say otherwise
its not useful
its not needed at all
their are many ways to avoid repeating urself
It isn’t needed but it’s a lot easier to make stuff once you learn it
Thats what I’m saying, it makes creating complex systems THAT much easier, since U just make each part separately and then just combine them wherever
Im curious to know
OOP is the one I know
this just screams for itself
The kind of file structure isn't exclusive to OOP
You call that Modularity and not OOP
whats the api to get the updated time of a place i can't find it anywhere
Is it server time or a date time
Or you mean the actual place latest published date
yes this
@tulip wyvern Search for Roblox Cloud API Get Place
I can't send a link
/cloud/v2/universes/{universe_id}/places/{place_id}
That’s why I don’t argue with people in this server
Most don’t know what their talking about
OOP favors Modularity but they are not equivalent
You can do ECS and still be using Modular system
Lots of frameworks are modular but that doesn't mean they use the OOP paradigm
i want when someone donates it sends to the new textchatservice
i want you to transfer it from oldlegacychatservice to the new textchatservice
someone told me to do this
does anyone know what it means or how to do it?
guys I want to use rbxUtil does vs code necessary
no
read the documentation on textchatservice
alr how can I add it without using aftman or smth
d oyou know how to do it?
im paying
copy the source from github
read the docs man
Y'all got any tutorial to replicate a physics based projectile/ball/throwable movements?
-- on render stepped
velocity += gravity * deltaTime
position += velocity
This with heartbeat?
...
Idk what's that 
Well it should work with heartbeat too
Aight I'll check
why use loops when you can js write about it like that
can i submit a react app on programmer application html, css or they only accept vanilla
not sure if this is a code issue but u scripters usually know the solutions to most problems
is there any way to allow materials to show alongside surface appearances
e.g if i want neons to show on a mesh that has a surface appearance applied
or do I have to have the mesh seperated
Guys Any of you What type of Script i should make for a Tool Cutscenes ?
why do that when you can write all 10^40 board combinations
i believe tintmask might be what ur looking for
???
i have made an skill and i want to make a cutscenes but idk what i need to do
and since i am broke i ask gpt
use a local script and work on some camera manipulation
that why i need to know what i need to ask
ye ask it how to manipulate the camera
for a cutscene
wdym
I ask it to make me a Camera script that when i use the tool it play the animation ?
im sure if you just ask it how do i add a cutscene to this skill it will tell you
kk
How does ProfileService work
who knows the game: stay alive and flex your time on others. or any stay alive/steal time game if u do dm me.
Loops would be smart and easier
While making my gun system was relatively easy, it was still quite a bit of work organizing it for modularity.
I free modelled the gun models, not the scripts.
dm me to make a stay alive game / steal time sort of game i need a scripter i pay per task
guys does anyone know hot to make lobby gui
i can ig
now make a viewmodel gun system
guys i just did a devex request for the first time and i clicked cash out,what should i do now?
Now you just wait for an email to make an account on Tipalti or whatever Roblox uses to pay developers.
does anyone know a good general place to start from if i'm trying to learn how to manipulate characters (like making vaulting/climbing etc.), ive tried a few times in the past and just can't really get it down
just realized this is probably a better question for code help
What are "free scripts"
what way did you guys learn scripting?
Tinkering with models
And just watched YouTube videos in my free time
I didn't even follow along, and that was a bad decision
Urime
There he is!
is there any good scripters that can help me rq
Guys if i used external API to check if people follows me on roblox to use codes would that be unsafe? Cuz rblx doesnt allow it and they might do smth
Why doesn't processreceipt work on team test?
Anyone wanna help me/teach me how to make a summoning system bro
Its technically against TOS
And good chance they act on it
looking for someoen to help me make gui shops/buttons
by help do u mean script them for u or do u just need a bit of help
bet
who is a very experienced scripter that has made games before and wants to work on one, we are gathering a team and we have some ideas to mind
Im triying to do an ApplyImpulse for a Knockback system in a server script but it seems that applyImpulse only work in a local script? Should i use fireAllClients or other method?
well you wouldnt need fireallclients just fire to the client you want to knockback. Character movements and animations bypass FE, they are automatically replicated
somebody give me a task to do in roblox studio (scripter)
What is FE?
Make a pong minigame
make a job system that pays at an interval that can be configured per job. Each job should include different ranks you can attain by simply working and gaining xp. The next rank higher should pay more and it varies across different jobs
filtering enabled
would this be easy to make? (the golf ball system)
Ye
what would i do
So do you recommend me to use applyimpulse over assemblyLinearVelocity / VectorForce?
apply a force on the ball
ah, when the player holds down their screen?
when an input is detected basically
^^ and im assuming you'd also need a scaling system to go along with the player being able to apply a certain amount of force to the ball. but overall relatively easy to make
ok, thank you
Whoever needs a scripter, I'm your guy. DM me if you can pay, if not then don't because I don't do scripting for free, I gotta be able to actually get money off of my time
Yes, use ApplyImpulse. A LinearVelocity would be constant and I assume you want your character to not infinitely go back lol
well if you want a more controlled movement, like if you were flying, or a slow push, or if you needed to last for a more extended duration then BodyVelocity or just custom movement . But for something like a simple Knockback, ApplyImpulse would get it done and is more ideal
can a remote event be referecened from a script to a script
or is that what module's are for
What bro
whoever gets my script to work i can pay 500 dm me
Word
yes. im abt to crash out
What's the script
local spawnersFolder = workspace
local cratesFolder = game:GetService("ServerStorage")
local spawners = {}
for _, spawner in ipairs(spawnersFolder:GetChildren()) do
if spawner:IsA("BasePart") and spawner.Name:match("^Spawner%d+$") then
table.insert(spawners, spawner)
end
end
local crates = {
cratesFolder:WaitForChild("Crate1"),
cratesFolder:WaitForChild("Crate2"),
cratesFolder:WaitForChild("Crate3"),
}
-- A table to track if a spawner is busy
local occupiedSpawners = {}
local function getRandomCrate()
local roll = math.random(1, 100)
if roll <= 80 then
return crates[1]
elseif roll <= 95 then
return crates[2]
else
return crates[3]
end
end
local function spawnCrate()
-- Find all free spawners
local freeSpawners = {}
for _, spawner in ipairs(spawners) do
if not occupiedSpawners[spawner] then
table.insert(freeSpawners, spawner)
end
end
if #freeSpawners == 0 then
return
end
-- Pick a random free spawner
local randomSpawner = freeSpawners[math.random(1, #freeSpawners)]
local selectedCrate = getRandomCrate()
local crateClone = selectedCrate:Clone()
-- Ensure PrimaryPart is set
if not crateClone.PrimaryPart then
warn(crateClone.Name .. " has no PrimaryPart set!")
return
end
-- Move crate model above spawner
local spawnPos = randomSpawner.Position + Vector3.new(0, 5, 0)
crateClone:SetPrimaryPartCFrame(CFrame.new(spawnPos))
crateClone.Parent = workspace
-- Mark as occupied
occupiedSpawners[randomSpawner] = true
-- Animate the whole model floating up
crateClone.PrimaryPart.Anchored = true
local targetPosition = spawnPos + Vector3.new(0, 2, 0)
local tweenService = game:GetService("TweenService")
local info = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
local goal = {Position = targetPosition}
local tween = tweenService:Create(crateClone.PrimaryPart, info, goal)
tween:Play()
-- Destroy after 8 seconds
task.delay(8, function()
if crateClone and crateClone.Parent then
crateClone:Destroy()
end
occupiedSpawners[randomSpawner] = nil
end)
end
-- Keep spawning crates every 2 seconds
while true do
spawnCrate()
task.wait(2)
end
Chatgpt ahh code
so u cant fix it?
I can
It's just everything in it is wrong
Chatgpt isn't a scripter gng
i deleted the idea anyway
but the game i wanna make is too hard
What type of game is it?
What kinda game is it
You'll get it with time and alot sooner than u think with determination
Just learn rather than depend on ai and free code
nah
i js learned my building in like 3 weeks. i dont wanna learn more stuff for now
a really big builder learned me my building. he made shit for stuff like blue lock rivals etc
plus i just got done with the lobby today so i wanna focus on improving
{"print+&"( "hello world" ) = true +
Scripting is perfect you don't need to dive into the deep end
Just learning how to use it with builds is enough
Gives u a taste of it
bro i barely built for 3 weeks
and people say i look like i built for a year or 2
Think about having moving parts in ur builds or having objects change when ur near them
The very basics
Hire some
lmao
im not that bad
the lobby is done
i js cant continue without the ui and scripts
What the lobby look like
im gonna add a place to sell and upgrade
That actually looks really nice wth
Wow
Cmon
It looks really good
You should hire a ui designer
I can help with scripting if you want
i dont wanna spend money on my first game
icl
Then you gotta learn
plus the main prob will be models
i could prob enslave 2 of my friends
and get them by tmr
Then do it
animations? effects?
You're cooked
I don't think dungeon quest has complex animations and effects
Just steal them
nope
if i make a game i wanna make shit myself
js stealing stuff is laz
Use them as inspiration
i wont learn ui or animations if i started deving bc of building
if i cant make the game i just wont
Damn
what else could i do in the map which i dont need too much models for
the windmills also have animations
Idk anything about maps
I'm just a braindead scripter
i mean like what other game could i make
Try thinking of something simpler
i was thinking of sum
but ud need ui
2 casted and you would have to attack each other breaking the enemys flag placed int he middle of the base
ud also have a arrow and could go on top of walls etc
is there any way to view the history of script edits of a certain script
No
how much do u charge to script the whole game
Depends on the game and what I'm gonna be doing
play button then u gotta choose red or blue. a server list where u can see kills etc and a gamepass where u get a staff and a vip gamepass. alsoa dono lb
That stuff is pretty simple ngl
Oop
sooo?
Idk
can anyoone here help me debug something really small in my game
also a 5% health boost if ur in the group and another 10 if u follow someone
I would feel bad if I charged you for that stuff
dms
unfortunately its just the color, not the material
you should totally put an annoying bright shit ui that has abunch of shit you can buy like pets, way too little money for what your paying, and a wheel spin
all the other kids at school are doing 
is it more optimized to clone a sound from replicatedstorage and play it on a part versus always having the sound in the part and playing it? (via a script)
If you're gonna have multiple parts playing the sound just clone
since i have just 1 part playing the sound, would always having the sound in the part be better than cloning it?
Have the sound in the part then
k thx
any computer science student or grad here?
Wrong server for that bro
check #code-help
I'm watching you...
- Inventory
- Autofire
- Ammo
- Reload
- Scope
- Shooting Sound
- Left Shift Sprint
- Camera Bobbing
- Gun Sway
thoughts?
this isnt advanced but nice
i rate it a 8/10
hmm i agree
its pretty good
should add animatation
ye
ty
you can try to cook up some urself and see how it turns out
or if you want to find an animator you can also do that
Famous last words 💔
i feel like thats the one thing they teach ppl not to say 🙏
❌ vibe code the whole game
Hi, does anyone know how to program games? I have a project in mind, obviously I'll pay money.
@jolly vessel u doing comms?
uh yes
How much for this
K
75k R$ or more, depending on the specifics of the teleport and movement system, and how much UI there is to script
what can I add/improve at?
Green's an ugly colour
well, green indicates that it's a common chest, the colors are assigned depending on rarity
bring back the flying thing
Are you asking someone to run it?
Ye?
Ofc I read it before running
I understand what it did
and I ran it on an online compiler
thank god it was me or it might be another MyDoom
ah ok
is anybody an experienced scripter I need a little help!
I'd guess there'd be at least one here
Hello, just to inform everyone. Do NOT take commission from @adi_royyy . It is a scam, he will ask you to add UI guy into studio where you make scripts and they will just steal it without paying you.
Never let anyone into your project
That's a given, lol
Did you make a report?
Wait a minute
I recognize that profile
Weren't they offering a stupid amount of money for a job?
Yeah. $500 USD
Would it be more efficient to program the characteristics of npc's all in one main module on serverscriptservice ... or give each npc a script?
I thought it was too good to be true
Use modules to divide unique behaviour, then build one system which centralizes NPC spawning and AI control
You start a new thread for the NPC
Should all work through interfaces
This module so good bruh
do you mean a module per npcs or one moduel with everytjmg
I have a script in serverscript service that handles the events for it
there is no waythat works
yo what
did you make this?
Actually, it does
dude thats so cool
It abuses niche syntax loopholes
ok so the way my npc system works is theres a serverscript that handles spawn events
and it calls the entity creator with the parameters
You should generally avoid using those loopholes
and the entitycreator creates the entity and assigns its data
There's no need to go that far in emulating OOP
and for each npc
it gives it the entity module
which is basically the character controller
so humanoid npcs and players share the humanoid controller
but monsters have their own
wdym give it the entity module?
what is your game like
do you have a script that handles stuff like character attacks etc
why
module is very intuitive
dud if u want help answer the question...
Violates standard and Roblox-set conventions, inhibits natural readability, adds overhead
so currently i have a script that handles enemies by using threads.. where it just uses move to
but now i need to make my troops...:
i haven't decided on how the troop system works.. cuz i dont want to deal with extreme lag..
i mean im pretty sure the module can be called conventionally it just looks uglier
what is your game about
a tower defense or rpg or what?
oh for a tds game
ya
but then i would need to replicate it to everyone
alr ill just call it the conventional way
yes but you need to do this to make a good tds game
its gonna be really really laggy otherwise
theres good tutorials on it i think
i think suphi has one
o ur probably right tbh
do you think the client side can handle that many npcs though
yes
idk i always assume that the server is better computational wise then the clinet
hell no
dont do needless calculations on the server
breh
server should ideally only be used for important logic
in an ideal optimized game every effect, building, etc is done on the client
and the server just handles data
in my rpg all effects are done on the client as well as some other stuff
bruh... i feel dumb lol
you can offload a lot more work to the client then you can do on the serevr
i was told that vfx is really the only thing to do on client (besides gui and stuff)
i mean realistically it is for most projects
but for some like tds games you also have to do the enemies
treat the enemies as vfx
the display of the enemies is the vfx
and the actual logic behind them is on the server
btw u dont ever have to do this
so basically only spawn them on all clients* but handle the spawning on the server (like when or how much its being spawned)
this is insanely impractical
Idk how to describe it
i havent made a tds game
But i guess you would have a table of npcs positions or something on the serevr
and the npc data like the enemy type or something
and then you give the position data to the client
and then the client makes the enemies and syncs them with the data
hmm buit then i have to becareful of exploiters
what can they do
if you do all the calculations on the serevr exploiters cant do shit
yeah
but the npcs will still be moving for all other clients
it would still go on the server
so basically treat the enemies in a tds game as vfx because they basically are just vfx
im pretty sure most enemies in tds games are just like static guys that walk at different speeds with different health
https://streamable.com/vto95t
why is my shit cursed bro
they are .. tbh im not making any high quality tds game
so its not like i need to put crazy things
yes
and even if you did make some boss npc with advanced logic or something down the line
the logic can jsut be replicated to clients like advanced vfx
or combat systems
u can still just do the logic on the server and replicate it to the client because nothing in a tds game is based on reactions etc
even some rpgs do what im talking about where the npcs are all on the client
im pretty sure vesteria does
o.. and i guess it would be high quality because it wont look like there is any lag
