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

Why does this keep throwing an internal server error?

Asked by 5 years ago

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?

0
Gotta use those code blocks, makes it easier for people to read it ReynaldoVictarion 70 — 5y
0
pLEASE use code blocks ok ReallyExpensive 10 — 5y
0
um ok sorry thundertornader 7 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

nevermind this was a roblox issue that only happend because roblox servers were lagging

0
sorry thundertornader 7 — 5y
Ad

Answer this question