Hey, I’m trying to concatenate a string value with a table, but I’m getting this error:
Here is the code related to it:
local PlayerBazooka
local BazookaName
for i,v in pairs(game.ServerStorage.Bazooka:GetChildren()) do
for i,item in pairs(Character:GetChildren()) do
if v.Name == item.Name then
BazookaName = v.Name
break
end
end
end
PlayerBazooka = BazookaModule.Bazooka..(BazookaName) -- Error line
print(PlayerBazooka.Bounce)
BazookaModule
is a Module Script that holds information about every bazooka, here is the BazookaModule
code:
local module = {
Bazooka = {
["Starter Bazooka"] = {
Bounce = 10
}
}
}
return module
I wanna know how to reference a dictionary key without getting the error, somebody can help me?