Hey, I’m currently trying to achieve a place Id check through a table, so if it finds the player in a certain place then it clones a script and parents it to their weapon. My only issue so far is that the table detects only 1 place id inside of the table and not the other 2.
I have tried using a for i,v loop for my table however it seems to stop completely if it doesn’t find the correct placeid, I have also tried using table.find still the same problem.
TLDR: It loops through the table, detects only the “TECH” one despite being in the other game
local placelist = {
[11893177941] = { -- DT Obsidius
Config = "Configuration_Obsidius",
Tool = "M-71",
ID = "11893177941",
};
[7730050913] = { -- TECH
Config = "Configuration_Vesra",
Tool = "M-71",
ID = "11893177941",
};
}
for i, data in pairs(placelist) do
if tool:FindFirstChildWhichIsA("ModuleScript") then return end
if i == game.PlaceId then
print("FOUND PID")
local CurrConfig = Configs:FindFirstChild(data.Config):Clone()
CurrConfig.Parent = tool
else
print("COULDNT FIND PID")
local RevConfig = Configs:FindFirstChild(tool.Name):Clone()
RevConfig.Parent = tool
end
end