Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Datastore script stops working at a specific line, halp?

Asked by 6 years ago
Edited 6 years ago

Greetings everyone, today when I was coding I have encountered a problem that I do not understand what to do against it. Here's my code:

function module.Claim(SeatName,PlayerName)
    local DTS = game:GetService("DataStoreService")
    local Show = DTS:GetDataStore(game.ReplicatedStorage.ShowName.Value)
    local PlayerID = game.Players:GetUserIdFromNameAsync(PlayerName)
    Show:SetAsync(SeatName,PlayerID)
    Show:SetAsync(PlayerID,SeatName)
    return "Done"
end

At fiveth line, it stops working(I checked with breakpoint(F9)) and it gives no error, no error at all. It's a modulescript and it does not continues from the script it's called from. I also use :GetAsync in same modulescript and it is just fine.

IMPORTANT EDIT: I tried to save this and it still does not work:

Show:SetAsync("TrySomething","Saving")

So the problem is about datastore.

0
TIP |Check with output next time | To see output in studio click on View -> Output Wiscript 622 — 6y
0
btw remove line 5 Wiscript 622 — 6y
0
There is nothing in output, and I said that already. I need both 5 and 6 lines. superalp1111 662 — 6y

Answer this question