Welp, after a Studio update this error no longer appears and the highlights are working as expected. Marking as solved. 
Hello, I am getting this error and can’t figure out why. Coincidently, something in that script is not working as expected. I can’t find this error online 
What is expected: when player comes within 20 studs of a barrel, a highlight will be visible. Currently, the highlight is added but not visible. And I get the error mentioned in the topic. Thoughts? Thanks!
-- searches for barrels within given distance, applies highlight if they are within
game.Players.PlayerAdded:Wait()
wait(2)
while wait(2) do
local ThePlayer = game.Players:FindFirstChildWhichIsA("Player")
for i, p in pairs(game.Workspace.Barrels:GetChildren()) do
if p:FindFirstChild("Highlight") then p.Highlight:Destroy() end
end
if ThePlayer.PlayerGui.ScannerHUD.Enabled == true then
for i, p in pairs(game.Workspace.Barrels:GetChildren()) do
if p.Scanned.Value == false then
local DistanceToBarrel = (ThePlayer.Character.Head.Position - p.Position).Magnitude
if DistanceToBarrel <= 20 then
local Highlight = Instance.new("Highlight")
Highlight.Name = "Highlight"
Highlight.Parent = p
Highlight.FillTransparency = .5
Highlight.OutlineColor = Color3.fromRGB(0,12,255)
Highlight.OutlineTransparency = 0.4
end
end
end
end
end