local DataStore = game:GetService("DataStoreService") local ds1 = DataStore:GetDataStore("CurrencyDataStore") local ds2 = DataStore:GetDataStore("ToolDataStore")
game.Players.PlayerAdded:connect(function(player) local hasgun = ds2:GetAsync(player.UserId) or false ds2:SetAsync(player.UserId, hasgun) if hasgun == true then local originalgun = game.ReplicatedStorage.Gun local copygun = game.ReplicatedStorage.Gun:Clone() local copygun1 = game.ReplicatedStorage.Gun:Clone() copygun1.Parent = player:WaitForChild("Backpack") copygun.Parent = game.StarterPack workspace.Variables.Config.hasgun = true end workspace.Variables.Config.hasgun.Changed:Connect(function() ds2:SetAsync(player.UserId, workspace.Variables.Config.hasgun) end) end)
this throws an internal server error, there is a variable in a config file that is called hasgun as i had no way of communicating between server scripts and local scripts i used config variables. Is that what threw the error?
nevermind this was a roblox issue that only happend because roblox servers were lagging