Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why does this keep throwing an internal server error?

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?

3 comments

0

Gotta use those code blocks, makes it easier for people to read it

0

pLEASE use code blocks ok

0

um ok sorry

1 answer

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

1 comment

0

sorry

This discussion is preserved as it was. New answers, comments, and votes are closed.