#Help#
1 messages · Page 1 of 1 (latest)
What doesnt work
you messed it up
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local BuyEvent = ReplicatedStorage:WaitForChild("BuyItemEvent")
script.Parent.MouseButton1Click:Connect(function()
BuyEvent:FireServer("Dirt Bike") -- change this string to item name
end)
I've change waitforchild to findfirstchild and still doesn't work
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Items = require(ReplicatedStorage:WaitForChild("ShopItems"))
local BuyEvent = ReplicatedStorage:WaitForChild("BuyItemEvent")
BuyEvent.OnServerEvent:Connect(function(player, itemName)
local coins = player:WaitForChild("leaderstats"):WaitForChild("Coins")
local price = Items[itemName]
if price and coins.Value >= price then
coins.Value = coins.Value - price
print(player.Name .. " bought " .. itemName)
-- Give them the item (example: a Tool stored in ServerStorage)
local tool = game.ServerStorage:FindFirstChild(itemName)
if tool then
tool:Clone().Parent = player.Backpack
end
else
print(player.Name .. " doesn’t have enough Coins for " .. itemName)
end
end)
Server side purchase logic It looks good but someone suggested to me that the remote doesn' work
** You are now Level 4! **
are there errors in output
answer the damn question
are there errors in output
No
I didn't have any errors
I've been doing this for 4 hours, I've entered it all several times and nothing works
This is a crisis
debug it then
every time something happens put a print() line
with a unique message
I need a different sales system, I don't know lua that well and python is not compatible
This script doesn't work. Can someone write me a script to sell 3 items
This is embarrassing
But I'm tired
Why is this script not working?
??
Mayb u spelled it wrong @silver girder
It's correct
it is ai
[called it](#📜︱scripting message)
How.?
THE capitalization
I read what you write and check
"how" I wasn't talking to you
See
🤦🏻♂️
not to mention the .
I wasn't talking to you
And who is the infant here if you don't even understand the chronology of the answers
my brother in christ just do what we are telling you to do
And stop spamming stupid gifs, it's annoying
@obtuse roost delete the answers this guy doesnt deserve it
indeed, you were told the code was fine and you probably had wrong item id [over an hour ago](#📜︱scripting message)
bro's learning 
can't help those who don't actually want it
I want I WANT TO DO THAT!! But you distract me with stupid provocations and gifs calling me infant just because you didn't understand that my "how" was not directed to you
you probably couldve fixed it by now if you didnt spend ur time arguing
It's a waste of time to talk to someone who doesn't understand who I'm addressing
😭
nono el wants you specifically
You started calling me names just because you don't understand that I wasn't even talking to you.

LOL
Nah he used ai to script it he doesnt know what hes doing
@marble patio you seein this
I said 2 hours ago that I use AI because I'm learning and I don't understand everything
mf calling me a scammer for trying to help
** You are now Level 5! **
LOLLL
yeah just walk away
Are you stupid or do you have a problem with logical understanding of the text you read?
Just ragebait him
in fact no reason for me to be responding either since i already gave correct answer over an hour ago
nice answer
Thank you, I tried to do it but nothing works
hah wrong link cheers
show code
** You are now Level 13! **
I don't understand everything as well as u
#📜︱scripting message 3rd times the charm?
I think I was there
yeah the item name is wrong
Where
bruh
AI cannot give you a brain
pretty concise 'where' given right here, but you were a bit too busy arguing with kyo to notice it seems 👍
A shockingly revealing coNclusion SMARTIE🙀. But AI can help you with many things if you learn on your own.
Dumb byarch
dude
Then just learn basic scripting mate
Who tries to be cold and funyyyyyy
you hypocrite
That's what I do, but I also do other things in parallel? And? If you don't have anything constructive to say, why not waste my time and energy? Read up on physics?
Maybe?
Instead.?
If you are so optimized
How did you just turn into physics?
Man is trying to add everything he learned in 5th grade to this conversation
Your logical dualism pushed me to this
Conclusion
Is this off YouTube
No
46 subscriber ahh 🥀
And?
tbh the bigger problem with using ai is not the brainrot it causes, it is how it [deludes people into thinking they wrote the code](#📜︱scripting message) when in fact all they did was plagiarize the ai. makes it very hard to give helpful responses when you do that.
Ai is trash for atudio
You can use ai as long as you know what ur doing
Like for checking small errors
As long as you get the concept
Ya I was gonna say. Ai isn't the issue. The issue is he has no idea what he's doing
i've found it to be a handy autocomplete and spellchecker on smaller scales. but that's about all its good for.
But you are clueless when we tried to help
I never wrote that I think I wrote this code - I keep repeating it and asking where I made a mistake
Fr
I'm pretty sure they told you the issue like 5x in this thread
ATP if youre this slow I don't think you should be coding at all but going to school instead
i've had it give working formulas sometimes too ... of course, after i already had the inputs ready and was about to google said formula
Tell me please how it should be correct since the Item is called a " Dirt bike."
What i did when I first started learning was have it give me simple lines and comment each one then explain to me what every part of the code is doing
AI is great at 2 things: turning rough explanations into terms to look up, and just the most basic of looking shit up from forums
you really need to already know what you need from the ai for it to be useful
it can't do anything you don't already know how to do
I use AI many times and everything works
i mean, technically it can, but it's like, if you don't know how to use a socket wrench then giving you an electric socket wrench isn't going to be at all helpful to you
technically the socket wrench can wrench sockets but if you don't know how to use it what was the point giving it to you
@obtuse roost please
I don't even read anyone anymore, I'm just waiting for your answer
I mean, it will do anything. You will just have no clue if it's right or pure bullshit. I've always used that as an argument against AI, AI has always lacked expression, and will never mention the fact that it's not sure about something
Bro this is taking forever
is server or localscript?
200 comments in a hour
There are so many factors that could be throwing off this script and he gave barely anything lol
I don't have time rn
you must be new here 
Are you communicating between multiple scripts? If so do you have events to speak between them?
** You are now Level 2! **
The root cause of the issue is very simple: AI code combined with a guy that doesn't understand code
I use ai code as well lol. But I can spot when the ai makes a mistake
See, that's fine. But if you've no clue and you don't actually check what the AI is doing then 🤷♂️ , shit goes south
Luau is a high level language, AI can often still make minor deviances and be right. Now try the same for a lower level language, and everything will just be going to shit as AI is just guessing shit
a huge issue i've noticed with ai code is it never keeps track of names for scripts, models, or variables for too long
That's why I wanted to ask someone smarter who understands this code - but instead of a constructive answer, you prefer to repeat like a broken NPC that " it's it's it's AI codeeeee🤓 and I you dont know anything." IQ LvL hard
Say something new
Or try to solve the problem with someone
Try to teach someone something
I would do it if I had your knowledge.
there is no errors in output? no infinite waits?
I already assumed it was an index issue before I even saw the code. Pyro has solved the issue 5 times for you
Instead of sitting and enlarging your hemorrhoids of hatred
ye it would've errored. should've been directed to the output window page in the docs, or asked to screenshot their output window. i've found that helps a lot with this.
ya if no errors are popping up you're going to have to debug it by addint print() statements on each part of it to make sure everything is working as intended
Eh fuck it
local Dumbass = "You"
print(dumbass)
--[[doesn't do shit, as vars are case sensitive.
This isn't rocket science, this isn't some insanely low level language.
It's fucking luau, one of the easiest languages to fucking learn]]
Barking machine
luau is basically java almost and java is insanely easy
this kind of thread is like half the threads on these roblox developer guilds, the public ones at least. you have to ask twice if there are errors. no information is given. and if you don't give correct and direct answer based on practically hopes, prayers, and a bit of telepathy, you're being rude and unhelpful and the thread devolves into what this one looks like. see it all the time.
Zero logical response
2/10 ragebait
theres actually very small differences in the language between the two
like they're way more alike than if you tried to learn c++ from knowing only lua
i think the problem is focusing too much on the ai. when you claim ai's code as your own, and then ask 'why it not worky', it becomes a problem as to what kind of answer to give you exactly - clearly just telling you the item name was wrong wasn't enough. putting the screenshots of the item name you're using, and the one in the table, wasn't enough.
that's why ai gets brought up.
instead of putting all ur energy into arguing what if you actually just did what we are telling you to
I did it!!!!!
and the general consensus is, arguing against that is not helpful to anyone even yourself. always better to be honest and disclose
The issue is the modern pace of these threads. It used to be that you would post a question on a forum. And then just had to wait, it could be 1 hour until somebody responds, it could be a few days. Now they just assume somebody will respond within 10 minutes. No need to google shit, no need to be precise. No need to even add any context. Sadly that is no longer the case so people just say shit like "my code is broken" with no additional information
ya multiple people asked you to add debug print statements, no response.
I'm closing the topic as usual I only get insults - Thank you to those who wrote anything to help me - I tried but it doesn't work that's all
like "i took this ai code [script] and i tried changing x and y but cannot get it to work" that's going to get you specific answers that you can understand instead of "oh well if you wrote it, hm yes you spelled something wrong" which is what you got
And he simply did not understand
hah yeah i've noticed that
back in my day, the only source of help was reading a book. if the answer wasn't in the book, or wasn't clear, you just had to sort of figure things out for yourself, or pay time and money out the wazoo to spend months doing courses in a physical classroom, online was not a thing, if you even get accepted in the first place.
Unless you were lucky and talked to the local guy that's an expert on said topics. Which was surprisingly common
rip local communities