I have a AutoShutdownScript on my game that was not made by me and it has an error. A value is detected as a table, not a string value as it is supposed to be.
if placeId == 0 then script:Destroy() end -- No proper info.
local market = game:WaitForChild("MarketplaceService")
local serverVersion = Instance.new("StringValue",game) --This is the StringValue that is detected as a table
serverVersion.Value = market:GetProductInfo(placeId) --This line is where it errors
serverVersion.Name = "SERVER_VERSION"
while true do --Extra code in the script if you want to see it
game:GetService("RunService").Stepped:wait()
local currentVersion = market:GetProductInfo(placeId)
if currentVersion ~= serverVersion.Value then
if manualShutDown ~= true then
local m = Instance.new("Message",workspace)
m.Text = "This game has been updated! Shutting down server..."
wait(1)
Instance.new("ManualSurfaceJointInstance",workspace)
else
local f,s = string.find(currentVersion,"autoshutdown:go")
if f ~= nil and s ~= nil then
local m = Instance.new("Message",workspace)
m.Text = "This game has been updated! Shutting down server..."
wait(1)
Instance.new("ManualSurfaceJointInstance",workspace)
end
end
end
end
Please Help
