#WHY DOESNT MY DAMN CODE WORK

1 messages · Page 1 of 1 (latest)

mental flax
#

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.

hearty iris
#

something

charred grail
#

ok

frank scaffold
mental flax
# frank scaffold 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)

frank scaffold
#

uhh

mental flax
#

thanks though

frank scaffold
#

balright

charred grail
frank scaffold
mental flax
frank scaffold
#

???

#

wait

#

ok im a unc

charred grail
#

I thought you just commented them out because they were erroring lol

mental flax
charred grail
brittle thunder
mental flax
brittle thunder
#

i meant nils in a table, if you try to save nil on its own nothing will happen

charred grail
#

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

brittle thunder
#

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

frank scaffold
brittle thunder
charred grail
#

I haven't used either, but I hear about profileStore more, so it's prob better

frank scaffold
#

this is a intreresting thing to do

brittle thunder
#

you're insane

frank scaffold
#

😭

brittle thunder
#

you say you want to experience it but... no.... no you don't 🙂

frank scaffold
#

yes i do want to experience it

#

have you done it?

brittle thunder
#

not with roblox but yeah i've set up databases before, and websites

frank scaffold
#
#

its possible

brittle thunder
#

and connectivity between said database and a game server

#

yea i know coz of httpservice

frank scaffold
#

but if that IP gets leaked

#

your cooked

#

right?

#

😭

brittle thunder
#

not if you secure your database properly

#

and secure its access with strong api keys

#

and dont put said keys on the client

frank scaffold
#

yeah

#

who does that

brittle thunder
#

OP probably would in that other thread with the if then do end

frank scaffold
#

😭

#

it would be considered a war crime to add your keys to the local

somber bobcat
#

what are all these different data bases 😵‍💫
i only know of the normal one

charred grail
#

I wouldn't put it above him to commit a few more

frank scaffold
brittle thunder
#

and then you need to painstakingly set up a database and webserver on it

brittle thunder
#

then you need to write some web code to act as an endpoint for your game

frank scaffold
#

but yeah its gonna be a pain in the ass paying money per month for data

brittle thunder
#

so the roblox servers can communicate with the database and store and retrieve data for it

brittle thunder
charred grail
#

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

frank scaffold
#

but i would much rather spend money than using the shitty ass datastore of Roblox

somber bobcat
#

is there any benefit to doing all that then just using roblox's datastore praysob

brittle thunder
#

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

charred grail
#

I mean, there's a little

brittle thunder
#

less responsive, costs more money etc

frank scaffold
#

you can doo cool stuff with external datastore

charred grail
#

It allows cross-game data and is useful for things like discord bots

frank scaffold
#

yes

charred grail
#

Honestly just not worth it though

brittle thunder
frank scaffold
#

its free

#

im not sure tho

brittle thunder
#

until you need to scale it up and it's not just a toy exclusively for yourself in studio only hehe

charred grail
frank scaffold
#

2gb is the max you need

charred grail
#

True

#

Still not worth it ngl

frank scaffold
#

but still using external databases is cool in my opinion

charred grail
#

It would definitely be interesting to experiment with

frank scaffold
#

yes it would

#

if im not mistaken you can transfer data from a roblox game to a off platform game that you made

#

lol

charred grail
#

Indeed you could

frank scaffold
#

in my opinion yes

#

its like im living im coding in hell

#

its like satans demon for me

charred grail
charred grail
#

Rarely experience any true problems with it

frank scaffold
#

but yeah people like Kruz might say its not that bad because he totally knows what hes doing wit it

charred grail
#

They aren't difficult 😔

frank scaffold
#

sigh

#

i have like 2 years of scripting experience and im still bad at datastores

#

i need a datastore pill