Script dosen't start or work

Hello, my script dosen’t start or work, but it dosen’t have any errors. How do you fix this?

local ItemPrompt = script.Parent

local Settings = ItemPrompt:WaitForChild("Settings")
local TierValue = Settings:WaitForChild("Tier")
local ItemName = ItemPrompt:WaitForChild("ItemName")
local Key = ItemPrompt:WaitForChild("Key")

local RarityTable = {

print(RarityTable[TierValue.Value]) -- dosen't print
ItemName.Text = 'Pickup <font color="'.. RarityTable[TierValue.Value] ..'">'..ItemPrompt.Parent.Name..'</font>'

Key.Text = "[G]"

Make sure that the local script is located in a player’s backpack, PlayerGui, or a character