Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Error: itemname is not a valid member of BillboardGui?

local uis = game:GetService("UserInputService")
local pickup = "F"

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local gui = player:WaitForChild("PlayerGui")

local info = gui:WaitForChild("PickupInfo")

uis.InputChanged:Connect(function()
	if mouse.Target then
		if mouse.Target:FindFirstChild("Item") then
			local item = mouse.Target
			info.Adornee = item
			info.itemname = item.Name --this is the problem
			info.Enabled = true
		else
			info.Adornee = nil
			info.Enabled = false
		end
	end
end)

Above is my script and it does not find my textlabel

Can someone explain what is going on for me and how I coould fix this :)

9 comments

0

what is itemname? is it a child or an instance?

0

itemname is a child of PickupInfo, the script says its not a member of it

0

what do you wanna change of itemname? the name or text?

0

what do you wanna change of itemname? the name or text?

0

I want the text to change to the item's name info.itemname = item.Name

0

Oh sorry forgot to add .Text

0

Sorry for wasting your time

0

It's ok.

1 answer

Hey sorry for wasting your time I forgot to add .Text

This discussion is preserved as it was. New answers, comments, and votes are closed.