HELP ME THIS STUPID DATA STORE IS FAILING ME, I AM GOING TO ONE PUNCH MAN PUNCH STYLE MY MONITOR IF THIS DOESNT GET FIXED.
MY HEAD WILL EXPLODE LIKE A BALLOON I SWEAR MY CODE DOES NOT WORK. THE DATA STUPID STORE DOES NOT WANT TO SAVE THE CHANGES THE PLAYER HAS DONE TO THEIR MODULE SCRIPT!!!! HELP ME I AM ON MY LAST TWO NEURONS, I AM CURRENTLY USING A POTATO FOR MY LIFE SUPPORT, JUST SOMEONE HELP ME, SMOKE IS EXITING MY HEAD, STEAM IS LEAVING MY EARS!!!! RAAAAAAAAAAAAHHHH. If someone writes something I'll give the scripts. Roblox studio just rage baiting me atp.
#WHY DOESNT MY DAMN CODE WORK
1 messages · Page 1 of 1 (latest)
something
ok
Hi!
Please send us a script so uhh we can understand understand!
Yeah no problem here. This is the local scripts for when the player buys the item: local Button = script.Parent
local boughtEvent = game:GetService("ReplicatedStorage"):FindFirstChild("BoughtEvent")
local shopItems = game:GetService("ReplicatedStorage"):FindFirstChild("ShopItems")
local item1 = shopItems:FindFirstChild("BlowDryer")
local Cost = 100
--local dataStore = game:GetService("DataStoreService")
--local alreadyBoughtSafe = dataStore:GetDataStore("alreadyBoughtSafe")
Button.MouseButton1Click:Connect(function()
local localPlayer = game.Players.LocalPlayer
local char = localPlayer.Character
local Board = localPlayer:WaitForChild("leaderstats")
local alreadyBought = require(game:GetService("StarterGui").ShopGui.Menu:WaitForChild("BoughtItemsScript"))
if Board.Cash.Value >= Cost then
if alreadyBought.isBought.BlowDryer == true then
return
end
local moneySpent = localPlayer:WaitForChild("MoneySpent")
moneySpent.Value += Cost
Board.Cash.Value -= Cost
item1:Clone().Parent = localPlayer.Backpack
alreadyBought.isBought.BlowDryer = true
--alreadyBoughtSafe:SetAsync(localPlayer.UserId, alreadyBought.isBought.BlowDryer)
boughtEvent:FireServer(Cost, alreadyBought.isBought)
--print(alreadyBought.isBought)
else
print("poor haha")
return
end
end)
uhh
wait actually nvm i think i solved it
thanks though
balright
Ah, yes, datastores in a local script...
its not handled in the local script
No what would happen is i would fire an event in the local script to the server to you know, activate the datastore
oh good
I thought you just commented them out because they were erroring lol
Yeah no that was not the problem, the problem is if i can store tables from a module script in data stores, like if a player changed a variable in the table from true to false then that bool value would save when the player leaves.
lol
Yeah that's not too difficult
yep tables save, nils save too
Thanks
i meant nils in a table, if you try to save nil on its own nothing will happen
You are making sure to actually edit the table in the serverscript the event is firing to, right
because im seeing a lot of values being changed on the client
you could look at profilestore, the modulescript you can find on google, the one that deals with saving player data for you, if you don't want to deal with datastores yourself. it has a lot of features that makes it very friendly for beginners
isnt datastore2 good too or is it more ass than profileStore
i haven't heard much about datastore2, but i can tell you profilestore is very well battle-tested, so you know it's good
I haven't used either, but I hear about profileStore more, so it's prob better
do you know what i wanna use and experience with? external datastore
this is a intreresting thing to do
you're insane
😭
you say you want to experience it but... no.... no you don't 🙂
not with roblox but yeah i've set up databases before, and websites
Developer Forum | Roblox
Hello Developers!!! Today I’ll be showing you how to create your own external datastore meaning you can access all your games data anywhere through http requests. wHaTs ThE pOiNT iN tHiS? Well lets say you wanted to link two experiences together by having the same data you can do this. Or maybe you want to access your datastore on Discord...
its possible
and connectivity between said database and a game server
yea i know coz of httpservice
not if you secure your database properly
and secure its access with strong api keys
and dont put said keys on the client
OP probably would in that other thread with the if then do end
what are all these different data bases 😵💫
i only know of the normal one
That post is a war crime
I wouldn't put it above him to commit a few more
apparently its much more easier to handle data
anyway if you really want to experience it first thing you need to do is spend about usd$10~$20
and then you need to painstakingly set up a database and webserver on it
not much of a problem
then you need to write some web code to act as an endpoint for your game
but yeah its gonna be a pain in the ass paying money per month for data
so the roblox servers can communicate with the database and store and retrieve data for it
hang on that's the best part
I want the op of the one post to respond already. Just to see what he has to say for himself for butchering my eyes like that
but i would much rather spend money than using the shitty ass datastore of Roblox
is there any benefit to doing all that then just using roblox's datastore 
so once you got the database all set up and working, and your game starts getting players, you then need to pay much more money to increase the capacity of the database to handle all the game servers you're getting
no LOL
in fact it's worse
I mean, there's a little
less responsive, costs more money etc
just read the forum
you can doo cool stuff with external datastore
It allows cross-game data and is useful for things like discord bots
yes
Honestly just not worth it though
okay fair but ye 99% of the time not worth the effort 👍
i think you can also use firebase from google
its free
im not sure tho
until you need to scale it up and it's not just a toy exclusively for yourself in studio only 
That and I'm way too poor to be spending like $20 a month just to run something that is only truly useful for niche purposes
relax you dont need $20 a month for roblox data you can pay about $3-5
2gb is the max you need
but still using external databases is cool in my opinion
It would definitely be interesting to experiment with
yes it would
if im not mistaken you can transfer data from a roblox game to a off platform game that you made
lol
Indeed you could
is it bad?
in my opinion yes
its like im living im coding in hell
its like satans demon for me
Meh. Roblox datastores aren't that bad, especially if you're using things like profilestore
Personally I find working with the normal roblox datastores decently fun
Rarely experience any true problems with it
but yeah people like Kruz might say its not that bad because he totally knows what hes doing wit it
They aren't difficult 😔