#code-discussion
1 messages Β· Page 127 of 1
ah ok mb
to send announcement
wdym
all g gl
im trying to make when a player spawns it gets a random clothing among multiple other clothing but nothing works
set the id of the shirt/pants decal to the id
not difficult
what the helll does that mean i only started coding 5 hours agoo
Ok i think i found a solution to the announcing when i kill someone. ty for helping btw :)
rate my old silly module for networking
This module wasnt meant to be optimized or anything like that, it was made for basic security, THIS IS NOT A GOOD SOLUTION TO USE. Iβm giving this out since im going to switch to blink and use it as my networking module. local Players = game:GetService("Players") local RunService = game:GetService("RunService") local ReplicatedStorage = game:...
local clothing = {
pants = {
},
shirts = {
}
}
local randomPants = clothing.pants[math.random(1, #clothing.pants)]
local randomShirt = clothing.shirts[math.random(1, #clothing.shirts)]
local localPlayer = game.Players.LocalPlayer
local character = localPlayer.Character or localPlayer.CharacterAdded:Wait()
local shirt = character:FindFirstChildOfClass("Shirt") or Instance.new("Shirt", character)
local pants = character:FindFirstChildOfClass("Pants") or Instance.new("Pants", character)
shirt.ShirtTemplate = `rbxassetid://{randomShirt}`
pants.PantsTemplate = `rbxassetid://{randomPants}`
something like this
(just a example)
@hallow crag mr killa0731
i am very sorry to disturb you my good sir
i have a question
hi
ok
you seem to be a intellectuall person about coding
specifically LUAU
i need help
yeah sure whats the problem
is script exploiting not allowed on this server?
no
its called "code-discussion" so just send any code
thank youuuuu
if u prefer
if i catch you exploiting in my game YORUE DEAD
ive literally banned
300 people
or smth
@hallow crag tysm, everything works now :)
do you explain everything with code?
only if its simple
to explain with code
yeah its not so simple to me lol
How do u code the troll button
well u need to learn how to code then
atleast a little bit
CAN SOMEONE TELL ME HOW TO CODE A TROLL BUTTON
the only thing i know is how to do leaderstats and how to press a ui button to get +1 clicks or whatever
listen to the .Activated event on the button fire to the server to peform the troll
and close and open ui
less go
have you made a good game killa?
what did you do lol
wheres tix gone bro
ive worked on several high visit games
no tix sowwy
how much visit π€
how much robux did you get?
confidential
so alot
300m+
good
what the flip
at bare minimum 45 mil
erm whats there to exploit in ragdoll game
like
i tried doing something like this and still doesnt work i need help π
any error?
nope it just doesnt load
send ur code
i deleted everything and tried something new but i think its defo wrong
well i need some kind of snippet of ur code so i can know whats wrong
how tell me me want
is the texture not rendering?
uhh no it just didnt change anything
add "rbxassetid://" to each ID
@hallow crag sorry to bug you, i tried to change my "press enter to send" into a button that you press to send as i thought it would be easier to work around but i cant get it to work. You see whats wrong here?
function isnt being called
this is incorrect its KillPlayer.OnClientEvent:Connect(PlrDeath)
also the OnClientEvent should only be done once
so put it outside of the function
yeah ik about this one, i did the right one earlier but i rewrote it and roblox automatically put it like that
and is the PlrDeath function even being called?
Im not used to making local functions so like i have forgotten how to do them correctly. I always do functions the other way. But probably not, i tried to copy the function for announcing
hey guys
is it possible to wheelie a A-chassis tune? i tried adding a wheelie script from the toolbox but it does not work?
did u do PlrDeath() anywhere in ur code
no π
chat, why do this do this? I just want to make a wave π
function module:CreateWaves(t:number, editable: EditableImage, height: number)
local frameBuffer = editable:ReadPixelsBuffer(Vector2.zero, editable.Size)
for i = 1, editable.Size.X do
local cosine = math.cos(math.rad(t + i)) * 5
for j = editable.Size.Y - height - cosine, editable.Size.Y do
local pixelIndex = ((j-1) * editable.Size.X + i - 1) * 4
buffer.writeu8(frameBuffer, pixelIndex, 255);
buffer.writeu8(frameBuffer, pixelIndex+1, 0);
buffer.writeu8(frameBuffer, pixelIndex+2, 0);
buffer.writeu8(frameBuffer, pixelIndex+3, 255);
end
end
editable:WritePixelsBuffer(Vector2.zero, editable.Size, frameBuffer);
end
doesnt work
sine wave
like at the end orr
sin wave doesn't work too....
show code
honestly dont know ask gpt
didnt know where to put the print statement..
just before humanoid
just put print("Ran")
ohh okayy
i dont think it is
that error is ur problem
np man
what the hell did u chat got this
???
U only use buffers for receiving kb/s optimization why r u using them for a wave
im trying to make a dead by daylight inspired game but i dont code so anyone wanna partner or smt?
I am just following smth similar made in editableImage roblox doc
as far as I can see, you made 0 condition to turn it off
well
i have tried
but that just makes it into a normal one
liike
just press to get +1
local leaderstats = game.Players.LocalPlayer:WaitForChild("leaderstats")
local Click = leaderstats:WaitForChild("Clicks")
local Button = script.Parent
local auto_clicker = false
Button.MouseButton1Click:Connect(function()
auto_clicker = not auto_clicker
while auto_clicker do
Click.Value += 1
task.wait(0.5)
end
return
end)
this should work
tyy bbg
Why is my block placing in the ground like that
I assume you make it spawns by your cursor, and your cursor always aim for a object which in this case is the ground
I click E to place, but aim with mouse
whats ur code for setting the block's location
one sec
Is it a grid system?
thats what im trying to do
Does it snap as of right now?
wait how do I copy my code like this dude
Are you using math.floor or math.round
snake_case in luau cringe
i love it
Gng
try multiplying snappedy by 1.5?
local snappedY = math.floor(position.Y / GRID_SIZE) * GRID_SIZE * 1.5
idk why it sent like that but
how?
getting there, but its in the air now
its the +2
try local worldPosition = Vector3.new(hitPosition.X, surfaceTop, hitPosition.Z)
instead of local worldPosition = Vector3.new(hitPosition.X, placementY, hitPosition.Z) bc placementY is surfaceTop + 2
ended up back in the ground
whaaa
maybe??
local placementY = surfaceTop + (BLOCK_TEMPLATE.Size.Y / 2)
Crazy
in the air when i changed it
thats with the 1.5?
i didnt try the 1.5
oh rip
1.5 will just mess everything up
how?
its a 4x4x4 block for reference btw
You are multiplying a global y with a scalar
That will just multiply the y value by 1.5
π
where should I put the 1.5 again @boreal wyvern
That's not how it works
gonna attempt
this is what i said local snappedY = math.floor(position.Y / GRID_SIZE) * GRID_SIZE * 1.5
can u just explain pls
Multiplying y will not increase it by a constant amount
It will increase it more depending on the y value
So the further it is from the xz plane the bigger the offset
You don't want the offset to be different for different heights
Anyways
The solution is just to return snapToGrid(result.Position)
And change all the math.floors to math.rounds
yeah the 1.5 didnt work
k
Try this @eternal apex
but why
Because math
I need help with something. I'm not sure when to use RemoteEvents/RemoteFunctions and when to just write a script directly in a regular Script. Also, when should I use a LocalScript and when a regular Script?
I mean u can remove the unnecessary lines
buying any amount of robux from 20k to 1mil for irl money
snaptogrid made it collide again
Did you change to math.round?
Just buy it from roblox...?
What result do you get?
in the ground but if i remove snaptogrid it goes in the air
Fully in the ground?
half
Or half
It seems
Your grid is offset from the baseplate by 2 studs
The easiest solution
Is
Move your baseplate down 2 studs lol
just the position?
For UI, if it's off screen and not gonna be loaded is it better to do Visible = false or Parent = nil? I'm assuming the later but just wanted so my opinions
That's a good question
Have you checked dev forums?
wdym not gonna be loaded
appreciate it
like ur never using it or just not using it right then
Basically not loaded until a different buttons hit where it comes on screen,
Not using it right then
It shouldn't be visible to player current
Currently
if ibuy from dev that's will be not expensive as roblox
Taxes
im looking for group
Wild
I saw one thing saying that visible.false took a tiny bit less memory but other than that no
I mean, it is a microoptimization either way
i think it is better to change visibility
I think you can afford to use either unless you are doing hundreds of frames
@thorn arch you think its hard to align the baseplate squares with the block?
Uh
How about this
Alright, didn't know if there was one that was better than the other
In the Project After night build they did obj.button.parent = nil but IK other games do Visible.false
Thank yall
i wish you would just explain how it worked π₯Ί
Anyone know why this doesnt work? im tryingto create a global leaderboard and im new to ordered datastores
And then undo the baseplate change
I'm not sure why math
floor and math.round are giving you the same result though
Yh add it to the thing on the return expression
is yoda here
is it more performant to represent booleans as bits
yo guys what's more performant for checking to see if someone is in the area for a ui to popup: runservice:heartbeat and checking distance, or touchevent with a part
For large data sure, but seems a little too much
Honestly i have been using a simple zone module that does it for me, cuz touch event is kinda unreliable most of the times
wym simple zone module
It's an open source module
oh
This is my example of using it
https://gyazo.com/a8a4f4cbc3f38b031a33b135611013ba
it's kinda slow, or is that intended
How is it slow
it takes like 1.5 seconds to load the message in
not to help you
π
Its because you have to press f to open the message
You can look at the benchmarks
See the performance yourself
Where are you calling it from?
custom implemenation is always faster
The module is made for that
You can customize it the way you need it to be
ok so simplezone also just does spatial query
I have made my own changes to it as well
why not just do that yourself
skid
π
I built mine upon that module
Cuz i liked how it worked
is the math lib fastcalled
Is this clean? If not, what's wrong with it, and how can I make it cleaner?
preciate it gng
π
Who wants to work w me on steal a ugc itβll be like steal a brain rot but w ugc
Programmer, Builder, UI?
Sure dm me
I was asking what you specialized in
ig itβs pretty good
making a Value that divides/multiples, but eventually the number gets reallly long, how do i not show the decimals?
ah i see
yes π’
math.round() if you wanna round up, or math.floor() to drop the decimalsand keep 61
hello code discussion chat
ty
math.round() can round down too
i think math.ceel or sum like that rounds up
math.ceiling
hey guys, i made a custom inventory system, but im having trouble on how to handle when a player resets their character. It now just clears their UI and inventory because my system tracks their tools (the tools get deleted).
Uh
ScreenGui has a propriety "ResetOnSpawn" i think cuz of that
yo guys what is the best way to learn script
π₯«
what is that bro π
brawldev tutorials
ty
if you cant finish them then you dont wanna script and you should give up or start at a later date
its not that, the tools get deleted out of the backpack too
bcs character resets
but im not sure how to save before the reset to load it after
well first of all hold the inventory in starterplayerscripts
then characterloaded:connect(function()) just iterate thru the backpack, and add the missing items
then search in ur scripts for Tool:Destroy() and delete that π
i believe starterplayerscripts scripts dont get destroyed on death
Should i use shapecast for my hitboxes or spatial queries (for a combat game)
cuz roblox doesnt delete the tools when player dies
its not the scripts
so
when a player clicks on reset
send me the code
is that datastore update per minute limit 60?
it gets rid of all tools in backpack
akso #code-help
Should i use shapecast for my hitboxes or spatial queries (for a combat game)
can i pls see the code i wanna see the saving logic
must be in the reset script
what don't u understand
send the code
theres 600 lines
is it like a toggle respawn thing
BRO JUST SEND THE CODE
u click settings
π
u can click on "respawn"
and i dont know how your code looks like, how it functions
i didnt make it, its roblox native
go to the respawn textbutton bro
i am working on pure guessing
OMG
and open its script
pls send the 600 lines of code
ur the ragebaiter dawg 
i mean you could do Humanoid.Died and just save the data
or just check if the backpack suddenly went down to 0
this is what i mean
oh
and if it went to 0 dont save anything
ye i told u roblox doesnt frikin delete ur tools when u respawn so send the cutom ui code dawg
temporary bandaid
and this too
it does tho
huh
function Local.UpdatePlayerTools(player: Player)
local playerTools = Local.GetPlayerToolsNames(player.Backpack, player.Character)
for containerName, container in InventoryData[player] do
for index, item in container do
if item == false or not table.find(playerTools, item.Name) then
print("shifting values down")
Local.ShiftValuesDown(player, containerName, index)
end
end
end
for _, toolName in playerTools do
if not Local.GetExistingTool(player, toolName) then
local freeHotbarSlot = Local.FindFreeHotBarSlot(player)
if freeHotbarSlot then
Local.AddItemToHotbar(player, toolName, freeHotbarSlot)
Local.SavePlayerInventory(player)
else
Local.AddItemToBackpack(player, toolName)
Local.SavePlayerInventory(player)
end
else
warn("Tool already exists in inventory, recounting")
Local.CountItemInPlayerTools(player, playerTools, toolName)
end
end
Local.SendInventoryToClient(player)
end ```
this is how i track player tools
function Local.TrackPlayerInventory(player: Player)
local function UpdateThisPlayersTools()
local now = tick()
DebounceMap[player] = now
task.delay(0.1, function()
if DebounceMap[player] == now then
Local.UpdatePlayerTools(player)
end
end)
end
local function OnCharacterAdded(character: Model)
task.wait(1)
UpdateThisPlayersTools()
player.Backpack.ChildAdded:Connect(UpdateThisPlayersTools)
player.Backpack.ChildRemoved:Connect(UpdateThisPlayersTools)
character.ChildAdded:Connect(UpdateThisPlayersTools)
character.ChildRemoved:Connect(UpdateThisPlayersTools)
end
local character = player.Character
if not character then
character = player.CharacterAdded:Wait()
end
OnCharacterAdded(character)
player.CharacterAdded:Connect(OnCharacterAdded)
end```
π
and this
but the problem isn't this
it's that im not sure how to handle player respawns
my system just tracks the tools
it just sends data to playerdatastore
local connection[player] = Humanoid.Died:Connect(function()
-- code something here that saved the data to a table, and when the player's character is added it uses this table
end)
-- disconnect the connection when the player leaves
simplest solution i can give u is this
local bp = plr.Backpack
for i, tool in plr.Backpack do
return tool
end
plr.CharacterAdded:Connect(function(char)
tool.Parent = plr.Backpack
end)
end)```
wait
oo cool
ill try this thanks
beat you to it 
YOU RAGEBAITED US
just turn on keepInventory
i lwk never knew there was a keepinventory
but i suppose that could be due to me never messing around with tools
player.keepInventory = true
aight
.
theres some built in function for getting the players lag
i orgot it tho
Bruh
then just offset it
π
Couldn't I just use like Workspace:GetServerTimeNow()?
actually lemme check docs
thats it
alr
thats mid
gtfo
What do I even do then..?
i use a predictive system like this https://github.com/Parihsz/Chrono/blob/master/src/client/renderCache.luau
but you need to check if the predicted latency is >1
else u would need to repredict
cus there are chances the player lags
ill check it out
I was just looking for a simple way to have the client rendered part smoothly lerp towards or aggressively lerp towards the serverpart
no way bro said brianrotπ
why is modeler emoji a black man?
I cant tell if thats a boy or girl π
πππππ itβs one of my friends
dang
yea want to make blue lock game
anyone know how fast pathfinding service adds up performance wise?
what skills do you have
Well we might be cooked on that
I can script it but itβs gonna hard to beat the competition
Chat is 10k robux a week a W or L offer for a long term position
I finished, yeah
Giving the opportunity to code for me for free ;-; lol
child labor
can someone help me or teach me how to make a plant system like grow a garden im tryna js make models for fun because i wanna make my own plants
ok now add a rebirth feature that costs a lot and when bought it resets your upgrades back to the start but gives another coin multiplier on top of any upgrades
good work so far fr
not too bad
what
omg me me me
where would u store it
on my account
wdym where would I store it
yea bu your account mght get hacked
My bank account with dev ex
besides dev exing it
so don't let it π
donβt be stupid n ur acc will be fine
yea but still
if you have 2FA, keep the robux in a group and it can't be taken out without 2FA
I deadass have had the same acc for 5y and itβs NEVER been hacked and Iβm a primary target for hackers
easy
just donβt be dumb lol
How tf else will you store it? Bank of Robloxia??
what you guys think of a steal a brain rot copy but for the anime jjk? you think it could make me some money?
jk jk
Someone got a little angy
xd xd!!
no
itβs already been done
hasnt
true
Even if u have speedy devs it will take two weeks
but u wonβt
so it will be 3-4
@strong folio @burnt pulsar do yall have white text
on ur screen
cuz i have that
lowkey just continue itβs fine
@strong folio do you have any cash grab game ideas
I launched my Steal a.... Game a few days ago, i dont feel thats bad, but its not getting recommended
can i helpo
i needa join a dev team
for fun
so yea
lemme help
sponsor it
alr ill cook that idea
why would I give u my ideas
π
All my ideas are in the works
I have 3 whole separate development teams working
appreciate it but im not looking for more devs
I spent almost 50 ad credits but the peak ccu was 48
idk whats wrong tbh
Idk if the gameplay is bad or marketing
theres like 50 steal a ... games
Send it
Theres way more π
Its name is Steal a Hero, its usually the 2nd one that appears its made by GZZGames
Sorry idk if i can send links
I know I complained about roblox docs being ass but discord.py is worse
they dont show you any examples of how to use any of it
I added more rooms lol
What the hell
is there overlapping?
Welcome to the real world
Skid
like honestly can i kill these people
like literally a person posted chatgpt code which is not even useful, you could make this in a minute
-- Services
local RunService = game:GetService("RunService")
-- Variables
local character = script.Parent
local eyes = character:WaitForChild("Head"):WaitForChild("Eyes")
-- Texture IDs
local normalTexture = "http://www.roblox.com/asset/?id=12520202472"
local blinkTexture = "http://www.roblox.com/asset/?id=12520204479"
-- Control variable
local isBlinking = true
-- Function to handle blinking
local function blinkLoop()
while isBlinking do
-- Stay in normal state for a random amount of time
eyes.Texture = normalTexture
wait(math.random(3, 7)) -- Random wait between blinks
-- Blink
eyes.Texture = blinkTexture
wait(0.15 + math.random() * 0.2) -- Random blink length (0.15 to 0.35 seconds)
-- Back to normal
eyes.Texture = normalTexture
end
end
-- Run the blink loop in a coroutine so it doesn't block other scripts
coroutine.wrap(blinkLoop)()
TEll me this is not chatgpt
or any other llm
I just made a system where a random premade room spawns connected to a random available door from a random pre-existing room and it goes on and on
327 lines
coroutine π

and im the one whos getting backlashb
any yall know how to like code parry system/combat in general?
use trove
uh bro just code it
pretty straight forwars
not tryna hire im tryna learn
learn to code first then
also use blink for networking
k ty
k ig lua ?
yes bro yse frameworks when you dont even know how to do it urself
yea
ight ty guys
alvinblox finna teach you
π
FUCK ALVIN FUCK ALL YOUTUBE TUTORIALS
What the squirrel do bro
discord.py docs are so bad and outdated they almost crashed my browser 
there is a WAY better version in one of the replies
i talked about it
people realised its useless and made it better
like bro and after all of that im the dumb
its not like someone just posted useless chatgpt code
not the worst thing i have seen in that category
guys is this not the script
local id = 1304238244
script.Parent.MouseButtonClick:Connect (function()
game.MarketPlaceService:PromptGamePassPurchase(game.Players.LocalPlayer,id)
end)
for gamepass
i think if bros struggling with that uihandler is out of question
who wants a code leak from a soon-to-be front-page game?
lil bit of framework I can post
looking for someone who could help us grow our rng game it going good so far for player, we only have 3 developer. DM me for more information:DD
yo mama
ysfm
Plz no more rng games π
shh he's gonna make 10 more just because of you
And WE(everyone but me)will be playing all of them
π«
brooo why iss so hard to get a j*b
just lie on your resume and collect that paycheck until they find out
howwwwwwwwwwwww
worse they can do is fire you
what's ccu
player count
.
I meant what's the ccu
mb
I know what ccu means I was just interested how much ccu he has
oh ok
What is this
how do i make a grow a garden plant system im tryna make plants of my own for fun ( i have no expierience)
Get some experience first π
You cant ask how to solve an integral without knowing how to add numbers
okkk where should i start?
Depends on your learning style
Me personally I learn fron videos then started building random projects that forced me to learn more
is scripting hard?
does anyone know how to upload a picture on a hiring post / what websites work
@lost burrow
could you delete their post its clearly not made by them
just edited free model
what kind of videos and projects
SCREENSHARING MY SPIN FOR UGC GAME I MADE IN ONE DAY JOIN UP!!!! VC 10https://discord.com/channels/211228845771063296/1138239246629605537
nvm
Scripting tutorials preferably the ones in playlists and the projects are anything you want like step on a part to open a door
one of the mechanics i will be using in my game, WIP
does any1 knows how to code transformation modulescript (custom rig) without loadchar or destorychar?
dm me if u need help
Does anyone know why my profile store isnt working? here are the screenshots
this is from the yt tutorial
aint no one gonna read the code from you
you didnt even provide any errors
do you have studio api services enabled?
is it one of those props hiding shooters game
nope
oh what is it then
assistant be chilling hard bro
i take out my anger on it so its an essential tool for me
use claude fr
i dont actually use ai lol
i use it from time to time for quick stuff
but thats it
assistant:
i just reinstalled studio and forgot to remove it
i just use it to fix bugs lol
can someone help me please
How does grow a garden have more players in a day than fortnite has had in 30 days π
The owner is jewish
so??
They own the algorithm
slop game
there is a primary part property in ur model properties
set that pls
3/4 of the players are bots farming in private servers
yes i do, also there arent even any errors, its just not creating my profile, its always nil
sorry for trying to learn to use profile stores bro π₯
just warning u that tutorial code is ass
oh fr?
yeah i just literally tried copying it exactly and it STILL didnt work in my game bruh π₯ looks like im not using profile stores ig
profilestores are good that code is just ass
yeah bro but it works in one game but doesnt work in the other thats just hella weird
there must be a mistake somewhere
i dont think there is, i have all of the scripts necessary, i have the remote event and i have studio api enabled
any error?
and elaborate on doesnt work
when i checked the profile store it just said nil
are u ending the session when the player leaves
yes
its literally the exact same code in 2 different games
are u reseting the players data anywhere
it works in one but not the other
i dont think so
if ur just saving numbers and strings
then it should save no problem
and tables ofc
can I put the variables also at the end of the code (e.g line 12, 13 instead 1 and 2)
im saving only numbers and tables
the defining ones up top?
well ur doing something wrong
ur either putting a instance, code is bugged or reseting the data somewhere
aight
yes i think thats it
thanks
im pretty new so im js playing around rn
i think they have to be on top (from my experience in python)
idk tho just try placing them downward and see if it works
what happens if they are twice there? like if I foorgot i already put the same thing twice
lua might not be reading the code line by line
yeah
nothing really, they just get defined again
np
@manic jackal btw since you are new i recommend you watch TheDevKing's series for scripting
im watching Brawl Devs Tutorials rn
ill look into it after
idk abt that, i havent watched his
thedevking explains all the code he shows and talks very clearly
ngl might be the best tutorials on yt
in terms of roblox studio
does python work in roblox?
can someone help how do i make it destroy layered clothing
idk
call the Destroy method on the clothing instance
or simply set the Shirt or Pants property to nil
is allowing http requests dangerous? I am only sending a request using a module and server script (in serverscriptervice) the studio warning got me paranoid
i dont think it really is
im not sure tho
its only dangerous if u have a backdoor in ur game
which is highly unlikely
wdym backdoor
Probably dont
you cant call a variable without the variable already being stated 
same w functions and other stuff
Thanks
thank youuu again it works
np
no because your code wont know what "baseplate" and "redRubberPart" mean yet
does anyone know why this code isn't working:
local serverScriptService = game:GetService("ServerScriptService")
local players = game:GetService("Players")
local playerDataService = require(serverScriptService.Data.PlayerDataServer)
while true do
for _, player in players:GetPlayers() do
playerDataService.UpdateCoins(player, 100)
end
wait(1)
end
It gives an error for line 3:
Requested module experienced an error while loading
well show the module
k gimme one sec
here it is
Is there any other errors
This usually occurs when there's another error
In the module
Lemme check
Here's the log after I added pcall to the module:
13:49:48.442 ServerScriptService.Data.PlayerDataServer:27: attempt to call a nil value - Server - PlayerDataServer:27
13:49:48.442 Stack Begin - Studio
13:49:48.443 Script 'ServerScriptService.Data.PlayerDataServer', Line 27 - Studio - PlayerDataServer:27
13:49:48.443 Stack End - Studio
13:49:48.443 Requested module experienced an error while loading - Server - test:3
13:49:48.443 Stack Begin - Studio
13:49:48.443 Script 'ServerScriptService.test', Line 3 - Studio - test:3
13:49:48.443 Stack End - Studio
13:49:48.506 Player joined! - Server - plotScript:8
13:49:48.506 Plot assigned! - Server - plotScript:14
13:49:48.784 Loading Animation Mirrorer... - Server
13:49:48.990 Loading Animation Mirrorer... - Client
13:49:49.057 Finished Loading Animation Mirrorer - Server
13:49:49.136 Finished Loading Animation Mirrorer - Client
13:49:49.176 [ProfileStore]: Roblox API services available - data will be saved - Server - ProfileStore:2098
It's giving an error on me defining the playerStore bc its nil
costs 500$ for further help
lol
im figuring it out myself rn
i realized i didnt look at the whole log
is this only for roblox Lua discussion? because i saw some people ads for building an AI SaaS Tool
hardcoded functions π
what?
GetCoins π
calm down bro let me learn in peace π₯
wdym using functions to return a module is fine if you don't want the values directly editable by other scripts
ya, i did that project as well
guys whats payoneer
i dont even see getcoins there dawg π₯ anyways i managed to finally get the profilestore working
I assume he's referring to getdata
he might be
???? just make 1 SetData function and pass "Coins" the parameters
why hardcode each function separately
also u dont yield for the data so when u call GetData before the data loads
ur logic is gonna error
or return
what does that mean
sorry im still new
to profilestore
and data saving
like if u call GetData from another script before the data loads it wont return the data and most likely break ur code
u need to add yielding
u need to wait until the data loads
ohh
then return the data
use subroutines or promises
now i gotta figure out how to do that
personally i recommend promises but subroutines are easier
alright
I'll look into it
crazy how i thought i knew quite a bit abt scripting and then all of these things come up which ive never heard before π₯
function DataModule:GetData(player)
if self._profiles[player] then return self._profiles[player] end
local profile
local thread = coroutine.running()
local connection
connection = self._profileLoaded:Connect(function(loadedPlayer, loadedProfile)
if loadedPlayer ~= player then return end
profile = loadedProfile
connection:Disconnect()
coroutine.resume(thread)
end)
coroutine.yield()
return profile
end
something like this
π
k, thanks, btw how did you make it to be like that code
alright, thanks so much
np man gl
thats this right '
`
ohh ok
yeah above tab
yh
np
I misunderstood what you were saying, you said Get coins not Set coins so I assumed you were talking about set data
yeah i said it wrong at first
my bad
I don't accept your apology, I sentence you to create a set coins function
is this ragebait
wdym, it's a joke because you hated the set coins function π
how do i show arms in firstperson
Guys i pay 25 dollars for a scripter dm me
25$ for what π
What coding langue do you guys think is best?
rust
luau is the most fun tho
thanks
if u can make good fun ball physics/mechanics i can take care of everything else
Thatβs easy
i just made this but i dont know what to add to it
how do i fix it?
?
Im assuming that your damage is weird
Your mutual is me
oh
Your hitbox is detecting multiple parts of the same player so its dealing that muxh damage to avoud it create another table and chexk if the player has already been hit
no the rotation error
Wym rotation
no absolutely nor
i added checks and every thing for that
it works just as it is
its the first rule of codingΓΉ
if it works then leave it lmao
yeah but its a terrible method
raycasting is alot more accurate
u can even detect specific body parts u hit
bet bet ima dm u
im using e:GetPartBoundsInRadius
sorry GetPartsBoundInBox
Getpartsinpart π‘
im pretty sure thats not a thing
It is
hi
yes it is
whats faster
num>0
or
num~=0
bro what
are you serious
yo guys i got a problem with my code
i just learnt remote events, when i click the button to give coins, it gives it to all the players in the server, how do i fix it?
are you sure it isn't something else?
wdym?
yeah
That's fine it's just weird
yeah
i think its a problem with another script i made before.. cause when players join my game they can only see the leaderstats of whoever joined after them
They're coming
who
why?
nvm i don't
i know that player 1 just didn't load into it
but idk why
like he didn't load in
this is my leaderstats code
idk what i need to do
You need to clone the leader stats not just move it around between players and WHY DO YOU HAVE AN IF TRUE STATEMENT
it was a task.wait(20) and giveAnnouncement but
i changed it to that
just to try
bro that says if true not while true
just remove the if statement
Well I would just instance.new it each time but since you create the folder before players join you can just clone it
okay
giveCurrency:FireServer(math.huge)
ez inf money
you're making it so every player is sharing the same leader stats with the same data
like this?
oh
i learnt about cloning yesterday
but i think i know how to do it
function realityCheck(received)
if received <= 100 then return true end
end
it isn't working
u dont even need that
I know
just store prices on the server
OHHH
wtf are u doing
I GOT IT
why are u cloning
he told me to clone
if you did a reality check like that then they could just do while true do fire(100)
but i just put the instance.new folder
I said Clone or instance new
and name inside the function
I only said Clone because you created a folder before players joined
ty bro
i appreciate all the help
yeah
the script works completely now
also a exploiter can get inf money in ur game with 1 line
He's just learning remote events
chilllll
dw its like this now
how so?
that doesn't make it secure
i was talking about the clone
remoteEvent:FireServer(math.huge)
not about the exploiter
^^
infinite
guess
its just a massive number
how do i make it secure
store prices on the server
sent an event to the server every click
its a script tho
and do reality checks on cooldown
not a local script
Okay @hallow crag you take it from here I don't have the energy for the rest
