-
What do you want to achieve?
Can I enter the opponent’s name from modulescript from a local variable into the script?
I would like to search for “Knight” using the name found in enemyName, but I don’t know if I can do it. I tried this solution,
CombatSettings.Settings.Mobs[enemyName].Statistic.Health
but I only get nil ;/
-
What is the issue?
I don’t know if I can do this -
What solutions have you tried so far?
Developer forum and documentation I didn’t find anything there
Snippet from script:
local enemyName = spawnPoint:GetAttribute("EnemyName")
local enemyModel = game.ServerStorage.Enemies[enemyName]
local enemyHealth = CombatSettings.Settings.Mobs[enemyName].Statistic.Health
local enemySpeed = CombatSettings.Settings.Mobs[enemyName].Statistic.Speed
Snippet from modulescript:
["Mobs"] = {
["Knight"] = {
["Statistic"] = {
["MaxHealth"] = 80,
["Health"] = 80,
["Speed"] = 20,
},
["Attacks"] = {
["Attack1"] = { -- NORMAL HIT
["HitBox"] = {
...