I'm trying to detect a new part in the workspace. but can seen to get it right. Players = Player WorkSpace = Game
is more likely for anti-exploit so it cant place any object without the script knowing it!
local Items = {"Camera", "Tarrain", "Baseplate"}
game.Player.PlayerAdded:Connect(function(plr)
table.insert(plr.Name)
end)
local workspaces = game.Game:GetChildren()
local Item = math.random(1, #workspaces)
local ItemsName = math.random(1, #Items)
if Item.Name == ItemsName then
print("EveryThing OK There!")
else
print("A Unknown part was found!")
Item:Destroy()
end
Here the error msg. ServerService.AntiExploit.WorkSpace:12: attempt to index number with 'Name' - Server - WorkSpace:12

1 comment
The error and the code shown do not match.