Ad
Log in to vote
0

need help making a abbreviating system wih DataStore2?

Asked by 8 days ago

i have had many tries but everytime it fails

module:


local Settings = { --1 ["Diamonds"] = { --2 ["Where"] = "leaderstats", --3 ["What"] = "IntValue", --4 ["Value"]= 0, --5 }, ["Clicks"] = { ["Where"] = "leaderstats", --6 ["What"] = "IntValue", --7 ["Value"]= 100, --8 } --9 } --10 return Settings

add coins event(in gui):


local player = game.Players.LocalPlayer --1 local cd = false --2 local amount = 5 --3 script.Parent.MouseButton1Click:Connect(function() --4 if not cd then --5 cd = true --6 game.ReplicatedStorage.Remotes.Add:FireServer(amount) --7 wait(0.5) --8 cd = false --9 end --10 end) --11

add coins event(in ServerScriptService):

game.ReplicatedStorage.Remotes.Add.OnServerEvent:Connect(function(player, amount) --1
    local currency = 'Clicks' --2
    player.leaderstats[currency].Value = player.leaderstats[currency].Value + amount --3
end) --4


Please send back the fixed code and let me know where to place it based on scripts and line numbers and where in the line

or send the code block

1 answer

Log in to vote
0
Answered by 8 days ago

no lol

0
thats mean tommymcoco1 20 — 8d
Ad

Answer this question