local desc = frame:GetDescendants()
for i, v in pairs(desc) do
if v:IsA("TextLabel") then
if v.Name ~= "Picking" then
v.Text = #supposed to be plr.Name, but this doesn't work.
end
end
end
So the above script just loops through a frame finding a text label called picking. However, I cant manage to get the players to print in the text label.
What do you mean by get the players to print in the text label?
Maybe try something like this:
function getPlayerFromUiObj(UiObj)
while not (UiObj.ClassName=="Player" or UiObj==game) do
UiObj = UiObj.Parent
end
if UiObj==game then return false end
return UiObj
end
local plr = getPlayerFromUiObj(frame)
local desc = frame:GetDescendants()
for i, v in pairs(desc) do
if v:IsA("TextLabel") then
if v.Name ~= "Picking" then
v.Text = plr.Name
end
end
end
This is untested code, but if that doesn’t work, make sure you want it to be ~= (not equal to) and not == (equal to)