Hello, I’ve been working on a TDS game seen by the 2 last posts I’ve encountered an issue of using data stores, my main issue now is remotely adding towers to the table of towers how would I do that?
I’ve already been recommended to use module scripts but I could not find out how to make it work. I will give my script
local datastore = game:GetService("DataStoreService")
local MyDataStore = datastore:GetDataStore("Towers")
local players = {}
local towers = {}
game.Players.PlayerAdded:connect(function(plr)
towers = {
Scout = false;
Sniper = false;
}
print(towers)
towers = MyDataStore:GetAsync(plr.UserId) or 0
MyDataStore:SetAsync(plr.UserId, towers)
end)