What do you want to achieve?
I want to get a value from a dictionary.
What is the issue?
The game tells me something isn’t a valid member of a dictionary when it is.
What solutions have you tried so far?
Tried changing name of the variable in case it confuses it with another variable.
for _, boss in pairs(bosses:GetChildren()) do
local range = boss.range
local magnitude = (range.Position - character.HumanoidRootPart.Position).magnitude
local specificEnemyData = enemyData[boss.enemyId.Value]
print(enemyData, specificEnemyData, boss.enemyId.Value) --Prints " { [1] = ▶ {...} } nil 1"
if magnitude <= specificEnemyData.attackRange then
hitEvent:FireServer(boss)
end
end