This script was working fine like one month ago and now I'm back to this game and it gives me that error. What the script does is it checks if there is an exisiting car and if it does then deletes it and spawns another one.
for i,v in pairs(game.Workspace:GetChildren()) do
if v.Name == game.Players.LocalPlayer.Name.."'s bmw" or v.Name == game.Players.LocalPlayer.Name.."'s mc" or v.Name == game.Players.LocalPlayer.Name.."'s por" or v.Name == game.Players.LocalPlayer.Name.."'s s13" or v.Name == game.Players.LocalPlayer.Name.."'s hoon" or v.Name == game.Players.LocalPlayer.Name.."'s gtr" then
v:Destroy()
end
end

3 comments
Are you executing this script in a LocalScript
No.
Where are you trying to execute this script? Is It within a player Character?