Teleport data not saving in datastore

I’m trying to transfer teleportData between 2 places and save it in a datastore, but the datastore is not saving the changed value even though the teleportData did transfer and change the value of the BoolValue(tool1, tool2, tool3, etc).

Here’s the script for the destination place



image

On line 65, this code teleports the player back into the destination place; The plan is to make the datastore save the changed BoolValue and load it smoothly and at the same time remove the problem of the Cash and Kills value becoming 0 as the teleportData only loads the BoolValues.

The datastore can save and load the Cash and Kills script but for some reason doesn’t save the BoolValues, like I said at the top the BoolValue of the tool changes into what the teleportData brought, which is ‘true’

I don’t know why you are using game:BindToClose(function(player); it doesn’t pass any arguments. Did you mean: game:GetService("Players").PlayerRemoving:Connect(function(player)?

2 Likes

Alright so turns out your solution was correct but also using “elseif” apparently in datastore makes it only change the first if statement??

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.