so im trying to make a clicker game where it saves the price of what your item is at but the datastore is too confusing for me ive looked on youtube but i dont understand it could someone please help also there are 2 scripts
this is the script thats for the item its a local script in a starter gui
button = game.StarterGui.Shop.Frame.ImageButton
player = game.Players.LocalPlayer
cost = game.ReplicatedStorage.StatFile.LocalPlayer.statnumbers.cost1.Value
add = 1
button.MouseButton1Down:connect(function()
if player.leaderstats.Money.Value >= cost then
player.leaderstats.Money.Value = player.leaderstats.Money.Value - cost
player.leaderstats.MPS.Value = player.leaderstats.MPS.Value + add
cost = cost + 50
end
end)
while true do
wait(0.01)
script.Parent.Text = "Cost: "..cost
end

6 comments
please use a code block
Please use more, ideally the whole script
ive never used this before so i dont know how to
Click on the blue Lua code block and paste the code in between the tildes
there ive fixed it
So basically, you need a DataStore? I'm kinda confused by your question but if you need a DataStore I can help you out.