So I want this to make it to a billboardgui gets cloned into a players head but has to be listed in a backpack. But the script keeps breaking, and i dont know why.
local pln = script.Parent.Parent.Parent local pl = game.Workspace:FindFirstChild(pln.Name) wait(0.1) local plh = pl.Head local pltn = script.Parent.Players:FindFirstChild(pln.Name) wait(0.1) -- Whenever I use a :WaitForChild command, I use a interval in case its too fast. if pltn == nil then print(" Player" .. pln.Name .. " does not have a tag. Showing nil.") end if not pltn == nil then local pltnn = pltn.Value local plt = script.Parent.Tags:FindFirstChild(pltnn) wait(0.1) if plt == nil then print(" Player" .. pln.Name .. " has a value, but assigned tag does not exist. Showing nil.") end if not plt == nil then local tag = plt:clone() tag.Parent = plh print("Player" .. pln.Name .. " has obtained tag " .. pltnn .. " successfully.") end end
the value i want it to pick up is a stringvalue named the player and the value as the tag name.