Question About Commands

Hey how are you? I want to make a system so when you do “!check (word)”, all parts with name of said word, a billboard gui appears above it. Help? Thanks!

You can use workspace:GetDescendants() in a for ipairs loop. Then you clone a billboardgui in the loop. It might be a hassle to remove without other commands.

(Edit: if you want it to make it from chat, you need ChatService)

Otherwise you can search in explorer

This should work.

game.Players.PlayerAdded:Connect(function(player)
	player.Chatted:Connect(function(msg) --fires when player chats
		if msg:sub(1, 7) == "!check " then --check if first 7 letters are equal to "!check ", if so then check for the name (line 4)
			local name = msg:sub(8)
			for i,v in pairs(workspace:GetDescendants()) do -- get all workspace descendents (children and the children's children)
				if v:IsA("BasePart") and v.Name == name then -- make sure its a part, and the its name is the one we are looking for
					local newbillboard = Instance.new("BillboardGui") -- create billboard
					-- put properties here, before parenting.
					newbillboard.Parent = v --parent to the part
				end
			end
		end
	end)
end)