I am trying to make a game called Scoobis Containment. It’s turning out really well, but it’s extemely difficult because the win condition can’t be tracked. My solution: the Orb Finder!
Whenever you use the Orb Finder, every orb on the map gets ‘pinged’ making them display a BillboardGUI that can be seen through walls.
However, the pinging system has an error with my in pairs(). I have no clue how to use in pairs() because nobody has really made a good tutorial on how to run through a list using it.
local debounce = false
local orbsthatexist = script.Parent:GetChildren("Part")
script.Parent.Activated:Connect(function()
if debounce == false then
debounce = true
script.Parent.Name = "Orb Finder [COOLDOWN]"
game.Workspace.Ping:Play()
for i, orb in pairs(orbsthatexist) do
orb.Ping.Enabled = true
end
wait(7)
for i, orb in pairs(orbsthatexist) do
orb.Ping.Enabled = false
end
wait(60)
debounce = false
script.Parent.Name = "Orb Finder"
end
end)
If you want to play the game for yourself, here is the link:
Currently the script fails at the first in pairs().