Hey guys I have a problem that is starting to get me really really frustrated. I've been trying to fix this script for about 1 hour now trying different methodes but It never worked and I have NO IDEA what I'm doing wrong.
Here's the simple script:
local OFFICIALPerksTable =
{
PowerEngagement = "Very Rare"
}
local Rarity = Instance.new("StringValue",game.Players.LocalPlayer:WaitForChild("Items").Perks:FindFirstChild(v))
Rarity.Name = "Rarity"
local TheStringValueWeWant = v
print(v) --Result: PowerEngagement (It's exactly the scring value I need)
Rarity.Value = OFFICIALPerksTable.TheStringValueWeWant
The script seems simple right? Supposedly it should read the OFFICIALPerksTable and return "Very Rare" from "PowerEngagement" (The string that is given).
Instead, it always returns nil. I tried tostring(), tried a for loop, tried changing the table, changing names, locations for 1 h and nothing worked. It would either give me a error saying that the value is nil or will set the Rarity value as "nil"
This is really pissing me off and I don't understand why this is happening. I'm at the limits of my frustration. Some help would really make my day way better without having to deal with this ROBLOX NO SENSE LOGIC. Thanks.

4 comments
change it to: ["PowerEngagement"] = "Very Rare";
refer to it like this OFFICIALPerksTable["PowerEngagement"]
I'll try and see the results
Still nil :/