I am making a proximity prompt that activates if the player who used it before is holding a tool named L1 through 5 and/or Admin. I’ve tried many different ways and i can’t find out how to implement the variable into :FindFirstChild()
script
local ProximityPromptService = game:GetService("ProximityPromptService")
local ProximityPrompt = script.Parent.ProximityPrompt
local clearance = {
["L1"] = true,
["L2"] = true,
["L3"] = true,
["L4"] = true,
["L5"] = true,
["Admin"] = true,
}
ProximityPrompt.Triggered:Connect(function(playerH)
local charmod = workspace:FindFirstChild(playerH.Name)
if charmod then
if charmod:FindFirstChild(clearance, true) then --issue here
print("success")
else
print("denied")
end
end